Max Verstappen put Red Bull back on top after beating Lewis Hamilton to pole position in the final laps of United States GP qualifying.
It is the first time Mercedes have been beaten to pole in Austin since 2013.
Hamilton took the lead at the start but lost it when Verstappen made an early first pit stop and tried an offset strategy aimed at fighting for the win in the final laps.
Verstappen pitted again on lap 29, with 27 laps still to go, and Hamilton stayed out for a further eight laps, Mercedes trying to give him as big a tyre advantage as possible in the final part of the race.
When he resumed after his stop on lap 37, Hamilton was just under nine seconds behind. He measured his pace in the early laps of the final stint, protecting his tyres, and then unleashed some pace, closing from 8.4secs back to 3.9 in just five laps.
Hamilton crossed the line just 1.3 seconds behind after one of the most hard-fought races of a classic grand prix season.
Verstappen said: "We lost out in the start and we had to try to do something else. The tyre wear is quite high here and we went aggressive. I was not sure it was going to work. But it is super-nice to hang on."
Hamilton said: "Max did a great job today. It was such a tough race. I got a good start, gave it absolutely everything but at the end of the day they just had the upper hand this weekend and I couldn't really do more.
"What an amazing crowd - to perform in front of you guys is such an honour. This is definitely our acceptance into the US. I hope we get more races out here and the sport continues to grow."
Meanwhile, The Mexican Grand Prix is next on the cards in two weeks' time and Hamilton will have a mountain to climb in the final four races.