Lewis Hamilton was disqualified from second place in the US Grand Prix after running Max Verstappen's Red Bull close for victory.
Hamilton was just two seconds behind Verstappen at the flag but his car was later declared illegal for excessive wear on the underfloor skid blocks.
Ferrari's Charles Leclerc suffered the same fate after finishing sixth.
Hamilton's disqualification promoted McLaren's Lando Norris to second and Ferrari's Carlos Sainz to third.
Verstappen was measured, slowly picking off the cars in front of him and then holding on for his 50th career win.
Hamilton passed Norris for second in the final laps but ran out of time to catch Verstappen for the lead.
What happened to Hamilton?
Hamilton's disqualification meant it was difficult to draw conclusions from a race after which, before the late technical drama, hindsight had left Hamilton and Mercedes ruing a lost potential victory had they played the strategy differently.
The skid blocks are in place to prevent teams running cars too low, which can be a potential aerodynamic advantage.
The Red Bull did not have the pace off-set it has had so often this year and Norris and Hamilton made Verstappen work for the win.
But Mercedes' inadvertent transgression confuses the picture of a race in which the team seemed to have made a step forward with an upgraded car.
Mercedes tried to make a one-stop strategy work while Verstappen and Norris went for a two, but the decision backfired on them and cost Hamilton more time than the margin by which he eventually lost the race.
Mercedes had to abandon the plan when Hamilton's tyres suddenly lost performance just two laps later. That forced Hamilton on to an off-set strategy, where he had to catch and pass both the McLaren and the Red Bull if he was to win.
Hamilton managed to close in and passed Norris with six laps to go to take second place.
He went for the inside at Turn One with seven laps to go and Norris defended with a late move.
The seven-time champion had to dive back to the outside and from there got the cut-back on Norris on the exit of the corner and passed around the outside into Turn Two and set off after Verstappen, not quite doing enough to challenge for the lead by the end of the race.
The world champion had a five-second lead with six laps to go and, although he was managing brake problems that caused a series of exasperated and sweary radio messages, was able to keep the Mercedes at arm's length to the flag.
Charles Leclerc lost fourth place to team-mate Carlos Sainz in the closing laps after the team's choice of a one-stop strategy for Leclerc failed to work out.
Leclerc was ordered to let Sainz by, a decision he questioned over the radio even though he acquiesced.
But the reasoning was obvious - the Ferraris were being chased by Red Bull's Sergio Perez, who passed Leclerc on his fading tyres with ease with two laps to go
Mercedes' George Russell took seventh behind Leclerc.
How did Verstappen hold on?
Verstappen win was hard-earned in a Red Bull that over the bumps of the Circuit of the Americas did not have its usual huge advantage on race pace over its closest rivals.
The Dutchman, who started sixth, overtook Russell at the first corner as ahead Norris took the lead from pole-sitter Leclerc and Sainz demoted Hamilton to fourth.
Norris led the opening laps from Leclerc, Sainz, Hamilton and Verstappen, but Hamilton and Verstappen soon despatched the Ferraris to set up the three-way battle for the lead by lap 11.
Verstappen pitted for the first time on lap 16, when he was 6.5 seconds behind leader Norris, who had Hamilton less than two seconds behind him.
While Norris followed Verstappen in next time around, fitting the hard tyres rather than the mediums chosen by Red Bull, and retained the de facto lead, Verstappen turned the screw, closed in and passed the McLaren for the lead on lap 28.
It was a good move, Verstappen diving late to the inside from quite some way back, but the race was a long way from over.
Hamilton delayed his first stop until lap 20 as Mercedes considered a one-stop strategy. But the decision backfired as he quickly ran out of tyre life and lost 10 seconds to Verstappen in just five laps.
Like Norris, Hamilton took the hard tyres, resuming 7.1secs behind Verstappen, who at the time was 2.5secs behind Norris.
Verstappen was now locked into a two-stop strategy while Norris and Hamilton had the theoretical chance to do a one-stop.
High tyre wear meant neither could consider it, but Mercedes stuck with their off-set strategy by stopping Hamilton three laps later than Verstappen at the second stops and hoping he could catch Norris and Verstappen before the end.
It set up a fascinating climax, with Hamilton setting off for his final stint six seconds behind Norris, and Verstappen a couple of seconds further ahead.
Hamilton complained that Mercedes had given him a lot of time to make up, and in the end he was right - although he closed relatively quickly on Norris, Verstappen was just out of reach.
Hamilton closed in and was two seconds behind Verstappen going into the final lap, an advantage the three-time champion was never going to lose.
Mercede were kicking themselves, given the pace Hamilton showed, aware in hindsight that they could potentially have won the race had they kept Verstappen behind him at the first pit stops rather than going for the off-set strategy.
But the flipside was that Hamilton was encouraged by the pace of his car, which was fitted with its last major upgrade of the season.
But their subsequent disqualification rendered those considerations rather moot, although the team were still convinced they had made a step forward with the car.