"God blessed me today for sure," said Hamilton, who set a lap record on his way to a third win in a row, as he spoke from the podium on a night where everything fell into his lap.
"I came here today really thinking it was about damage limitation, and we've come out ahead. So I'm very grateful," he said later. "To come to a track that was potentially our weakest circuit, and come away with a win like this and those points, it's really such a fortunate scenario... so I definitely have a skip in my step."
The Briton cashed in after Vettel, Ferrari team mate Kimi Raikkonen and Red Bull's front row contender Max Verstappen smashed into each other as they raced off the wet starting grid and into the first corner. Raikkonen had made a storming start from fourth, Vettel a less impressive one from pole position while Verstappen went for the middle ground and was caught in a Ferrari sandwich as they converged. The stewards summoned all three and decided no driver was predominantly to blame.
The first race to be hit by rain in the decade that Singapore has hosted Formula One had started in treacherous conditions, puddles gleaming in the floodlights, after a formation lap behind the safety car. With Hamilton starting fifth, everything looked set for Vettel to retake the overall lead that he had surrendered only two weeks earlier at Monza in Italy. And then it all went wrong, the collision with Raikkonen punching a hole in the side of Vettel's car before he spun into the wall at turn three.
"It's bitter but it's done," said the German, a four times Singapore GP winner, whose retirement ended a run of 18 successive points finishes and left him with a mountain to climb.
"Championship-wise it's a big step forward," recognized Mercedes team boss Toto Wolff. "The quickest car and the quickest driver were out within a minute into the race and that can happen all the time. Today we benefited from their misfortune, it happened to us in the past."
The incident allowed Hamilton into a lead he would keep through two more safety car periods and a perfectly-timed switch to dry weather tires. Australian Ricciardo had been confident of victory, despite missing out on pole on Saturday but could not keep up with the Briton's pace on Sunday.
"I'm a little bit disappointed to miss out on the win. But I'm still going to be grateful and happy with another podium," he said. "I watched the chaos in front of me. It was probably a good thing I had a poor start as I'd have been caught up in it."
Spaniard Carlos Sainz, who will move to Renault next season, finished fourth for Toro Rosso to score the best result of his career. Force India's Sergio Perez was fifth with Briton Jolyon Palmer, making way for Sainz at Renault, scoring his first points of the season and best career finish with sixth. Belgian rookie Stoffel Vandoorne was seventh for McLaren, also his best performance to date, ahead of Canadian teenager Lance Stroll in the Williams and Romain Grosjean in the Haas. French rookie Esteban Ocon scored the final point for Force India in 10th. Renault's Nico Hulkenberg, who had been in third place early on, also set the unenviable record of most races without ever standing on the podium (129).
After three safety car interruptions, the race ended with 58 of the 61 laps completed after hitting the two-hour mark. Only 12 of the 20 cars finished. (Reporting by Alan Baldwin, editing by Rex Gowar)