Red Bull's Max Verstappen survived a late-race assault from title rival Charles Leclerc's Ferrari to win the inaugural Miami Grand Prix.
Leclerc strained everything for five laps to get close enough to pass but Verstappen broke his challenge.
Verstappen's win cut Leclerc's championship lead to 19 points.
It was an unexpectedly dramatic finish to a race that had appeared to be petering out after Verstappen's early climb from third on the grid to the lead.
The world champion passed the second Ferrari of Carlos Sainz around the outside of Turn One and into Turn Two then chased down Leclerc before taking the lead at the start of the ninth lap.
From there, Verstappen edged out his advantage through the pit stops to seem to be cruising to victory with an eight-second lead before a safety car was introduced for a bizarre crash between McLaren's Lando Norris and Alpha Tauri's Pierre Gasly.
Closing up the field gave Leclerc another chance when it appeared his hopes were gone, and he gave it everything to try to reclaim the lead.
He was within a second of Verstappen for five laps after the restart but was always agonisingly just too far away to make a proper lunge for the lead.
Eventually, Verstappen put his superior pace to good effect to ease out his lead to just over a second, preventing Leclerc from benefiting from the one-second advantage provided by the DRS overtaking aid, and the race was done.
It was Verstappen's second consecutive win - the first time a driver has achieved that this year - and it continues his run of either winning or retiring this year, albeit both retirements coming when he was in second place having lost a fight with Leclerc.
It was an impressive recovery after losing a lot of track time on Friday from a series of reliability problems that he felt had prevented him fighting for pole position.
The two title rivals were in a league of their own, leaving their team-mates well behind.
Ferrari's Carlos Sainz hung on to third for the final podium position, despite Perez having the advantage of fresh tyres after Red Bull pitted him for new medium tyres at the safety car period.
Verstappen overtook Leclerc with some late braking on lap nine
George Russell drove an excellent race to take fifth place as best of the rest ahead of Mercedes team-mate Lewis Hamilton.
Russell fought up from 12th on the grid, running the hard tyre at the start and going long. At one point he said to the team they should keep going and hope for a safety car, and his wishes came true.
That gave him a cheap pit stop - in which he loses less time to rivals because they are lapping more slowly - and put him on new medium tyres behind Hamilton on old hards at the restart, and the 24-year-old used his extra grip to good effect to pass the former world champion.
He had to do the move twice as the first attempt was ruled out by race control for being unfair, because he made it after benefiting from going off track before making it. But having been told to let Hamilton back past, Russell re-passed him straight away into Turn 11.
"The strategy's not been kind to me, man," Hamilton said over the radio to race engineer Peter Bonnington as he bemoaned the second time in three races he has lost out as a result of the timing of a safety car.
He and Bonnington discussed the idea of stopping for fresh tyres during the safety car period but ultimately decided not to because it would mean losing a place to Russell at least, but that happened anyway, as it always looked likely to in the circumstances.
Alfa Romeo's Valtteri Bottas was ahead of them at the restart but slid wide at the last corner and lost out to both Mercedes.
Alpine's Esteban Ocon - another man to benefit from a long first stint on the hard tyres and a chance to change under the safety car - took eighth ahead of team-mate Fernando Alonso, who was penalised five seconds for a collision with Gasly, while Alex Albon produced another strong race to take the final point for Williams in 10th.
Norris' accident with Gasly came shortly after the Frenchman's touch with Alonso.
Gasly ran wide through Turn Eight and was on the radio complaining about a problem with the car when he and Norris somehow came together accelerating onto the long straight that follows, Gasly's front left wheel hitting Norris' rear right and tipping the McLaren into a spin.
There is now a two-week break before F1 returns to Europe for the Spanish Grand Prix, and Ferrari need to do something about Red Bull's building momentum.
-- Courtesy of BBC Sport