Mercedes' Valtteri Bottas took pole position for the United States Grand Prix with Lewis Hamilton only fifth as he stands poised to seal the title.
Bottas headed Ferrari's Sebastian Vettel, Red Bull's Max Verstappen, Ferrari's Charles Leclerc and Hamilton in a very closely contested session.
Bottas was 0.012secs ahead of Vettel as 0.108secs covered the top four.
Bottas ends a run of six consecutive pole positions by Ferrari stretching back to the Belgian GP in August.
The end of qualifying was an anti-climax as only Verstappen of the top five was able to improve the lap time set on their first runs and Hamilton even aborted his lap.
And it was an unusual turnaround for Hamilton, who had beaten Bottas in the first two sessions.
It was Bottas' fifth pole of the season, while Hamilton has only four.
But it adds little jeopardy to the climax of the championship, however, as Hamilton will surely become a six-time champion as long as he finishes the race.
Bottas' only hope of extending the battle to the next race in Brazil is if he wins the race, but even in that scenario Hamilton needs only to finish eighth to tie up the championship.
Hamilton, who was 0.292secs slower than Bottas, said he only had himself to blame for what he described as "probably the worst qualifying I've had for a long time".
"The car was great," he said. "I just wasn't on form and I just couldn't pull the laps together. It was me. I will continue to work at it and I hope tomorrow I can do a better job."
Hamilton said he was not thinking about the prospect of winning the championship.
"I am trying to figure out what went wrong and how I can get myself to the front," he said. "It is going to be a tough challenge trying to get past two Ferraris and a Red Bull and Valtteri."
Mercedes finally back on top
Mercedes have not had a pole position since the German Grand Prix back in July, but they have looked more competitive over a single lap for the entire weekend at the Circuit of the Americas.
Hamilton would have been expected to be the man to lead their charge against Ferrari, but it was Bottas who came up trumps when it mattered and Hamilton who underperformed.
Leclerc's preparations for qualifying were hampered by an engine breakdown on his final lap in final practice that led to him missing the entire session and forced Ferrari to change his engine, fitting an older specification of power-unit.
In the circumstances, he did well to qualify just 0.096secs behind team-mate Vettel.
Verstappen was the only driver in the top five who managed to improve on his final lap but he missed out on pole by just 0.067secs.
Inevitably, there will be chatter about the circumstances for Ferrari's first qualifying defeat for so long.
The Italian cars have dominated F1 over a single lap for two months, their pace founded on their prodigious straight-line speed, and a car upgrade at the Singapore Grand Prix that gave them more downforce.
But on Saturday morning governing body the FIA issued a technical ruling underlining that it would be considered illegal for any team to tamper with the operation of the meter restricting fuel flow. This came as a response to an inquiry from Red Bull, in the context of Ferrari's advantage, into certain potential methods of increasing the fuel flow.
Mercedes F1 team boss Toto Wolff said: "Certainly the three teams were much closer together in terms of straight-line performance here in the US but I wouldn't sat this is down to any specific event, it's just a fact we have won our first pole position since Hockenheim and we were really in the mix."
Behind the top six, McLaren's Carlos Sainz excelled in setting seventh fastest time as best of the rest, 0.328secs quicker than team-mate Lando Norris in eight, wit Renault's Daniel Ricciardo and Toro Rosso's Pierre Gasly completing the top 10.
What they said
Bottas said: "It was a nice lap at the beginning of Q3 and to get one of those kind of laps on a track like this is a good feeling.
"The last run there was a bit less grip overall and I am glad no-one could improve at the end."
Vettel added: "It was very exciting because we were all so close. I thought I had a little bit more. I left some in the high speed for my final run but when I got there on my final run I was already a bit down. Overall, happy, let's see for tomorrow, hoping for a good start."