Lewis Hamilton inherited victory in the Bahrain Grand Prix after an engine problem hit runaway leader Charles Leclerc's Ferrari late in the race.
Leclerc had dominated after retaking the lead following a poor start and was on course for a maiden victory when his hybrid system failed.
Hamilton closed an eight-second deficit within three laps and swept by for his first win of 2019 with nine laps to go.
Leclerc would have slipped down to fourth behind Hamilton's team-mate Valtteri Bottas and Red Bull's Max Verstappen but was saved by a late race safety car.
- Listen: Vettel spins off as Hamilton passes!
- Mick Schumacher eighth in standings after Formula 2 debut at Bahrain Grand Prix
- Formula 1's Netflix series Drive to Survive: What we learned
- Bahrain Grand Prix results
As victory slipped from his fingers, the despair in Leclerc's voice was clear as he asked the team what had happened, and was told he had suffered a failure of the MGU-H, the part of the hybrid system that recovers energy from the turbo.
It cost him 40km/h on the straights and left him helpless as first Hamilton and then Bottas closed in at five seconds a lap.
"Oh my God," he said, as he saw a fairytale victory slip from his grasp on a weekend on which he had destroyed his four-time world champion team-mate Sebastian Vettel.
Vettel, meanwhile, made yet another high-profile error, spinning his car while being passed by Hamilton for what at the time was second place with 20 laps to go.
Vettel already needed a pit stop for fresh tyres, but he also suffered a front wing failure as he toured around to the pits, and the German finished fifth, two places behind his team-mate.
"That was extremely unfortunate for Charles," Hamilton said over the radio on his slowing down lap. "We have work to do to keep these guys on our tails."
A new force emerges
It was a bitter blow for Leclerc, who thoroughly deserved the win, but the Monegasque had already done enough to announce himself as a major title contender.
He had started from pole position, but a poor start meant he dropped behind Vettel and Bottas on the first lap.
But he passed Bottas at the start of the second lap and then Vettel on lap four, around the outside of Turn Four, and proceeded to underline his superiority over Vettel by cruising off into a comfortable lead.
Until the Ferrari hit trouble in the closing laps, the race was all behind Leclerc, as Vettel and Hamilton swapped positions behind him.
Hamilton must have thought he had blown it
Hamilton jumped Vettel at the first pit stops, but Mercedes's choice of soft tyres, while the Ferraris fitted mediums, left him struggling.
Vettel closed him down and passed for second on lap 24.
Hamilton felt he was in dire trouble, but he managed to keep Vettel in sight, so when both pitted for a final stint on mediums Hamilton was able to close on Vettel.
The world champion passed Vettel around the outside of Turn Four with 20 laps to go, and the German spun on the exit of the corner.
"Aargh," he said. "New tyres. Box."
It was another mistake that raised questions about Vettel's ability to race in high-pressure situations after a series of errors last year dashed his title hopes long before they should have died.
Vettel said he believed his front wing had failed because of the vibrations from his damaged tyres. Regardless, the dynamics within the Ferrari are now fascinating.
Vettel had started the season as their leader but Leclerc has now staked his claim and proved he will be a major force this season.
Behind the big three teams, with Verstappen fourth and Vettel fifth, Renault lost a finish in fifth and sixth places when both their cars failed on the same lap with three to go.
It was this retirement that brought out the late safety car that saved Leclerc's podium position and it gave sixth to Lando Norris, who drove a strong race for McLaren.
He beat Alfa Romeo's Kimi Raikkonen, Red Bull's Pierre Gasly and Toro Rosso's Alexander Albon, the Anglo-Thai scoring points in only his second grand prix.
Driver of the Day
What happens next?
The Chinese Grand Prix in two weeks' time - F1's 1,000th race. After the huge changes in form between Mercedes and Ferrari in the first two grands prix, it is hard to predict.
However, if Ferrari can improve their reliability and continue to show the performance they had in Bahrain, they will start as favourites.
What they said
Leclerc: "It happens. Unfortunately, today was not our day. But I am extremely confident. The team have done amazing job. We have been lucky on an unlucky day with the safety car. Very hard to take but we will come back stronger."
Bottas: "As a team we got lucky today we kept it together. The hard work at the factory is paying off I had a difficult race as the balance of the car was everywhere and I made a few mistakes.
"I never will give space, the first lap was good I had a lock-up in turn one."
Hamilton: "Today was a really, really hard job and the team were incredible. It was a devastating race for Charles.
"We were lucky today. I gave it everything in the race. [Leclerc] has a lot of race wins coming in the future."