Lewis Hamilton beat Mercedes team-mate Nico Rosberg to pole position at the United States Grand Prix.
It could be a crucial achievement for Hamilton, who needs to beat Rosberg in the race on Sunday to revive his faltering championship hopes.
Hamilton, who was 0.216 seconds ahead, trails by 33 points with 100 available.
Red Bull's Daniel Ricciardo beat team-mate Max Verstappen to third, ahead of Ferrari's Kimi Raikkonen and Sebastian Vettel.
Hamilton reported gearbox issues during qualifying - this is a race he cannot afford to retire from
Hamilton was in convincing form throughout qualifying, fastest on both runs in the top 10 shoot-out and in the first session, although Rosberg pipped him by 0.099secs in the second session.
His attention will now be focused on the start, with which he has problems several times this season, because of the importance of leading into the first corner.
With warm, sunny weather predicted in southern Texas for race day - and 95,000 people expected through the gates - overtaking during the race will be difficult for whichever Mercedes driver is behind on the first lap.
"I feel amazing," Hamilton said. "It is my first pole here and many years of trying.
"I want to say a big thank you to the crowd - I could hear everyone cheering as I crossed the line and the energy was incredible."
Rosberg said: "Lewis was just quicker in sector one today. That's the way it is. He did a good job.
"As we have seen this year, qualifying is not all-important so I still have a good chance in the race."
The healthy crowd at the Circuit of the Americas, some of whom have been attracted by the chance to watch pop superstar Taylor Swift for free as part of the admission cost, were treated to an exciting session as the Mercedes duelled it out.
Hamilton now has two poles at United States GPs. The same as American racing legend Mario Andretti (1968 and 1978), seen here driving the '68 Lotus. Source: Forix
The race has added intrigue because of Mercedes' decision to start on the soft tyre, on which they set their fastest times in Q2, while Red Bull have split their drivers - Ricciardo starts on the super-soft and Verstappen on the soft.
The Red Bulls matched Mercedes for pace on their high-fuel race-simulation runs in Friday practice and could be a threat in the race.
Mixing up the drivers' strategies may keep Mercedes guessing if Red Bull can show comparable pace on Sunday afternoon.
Ricciardo said: "We expected it to go like this. Max wanted to try the soft and I was happy to go on the super-soft. I was more comfortable on that tyre in the long runs yesterday and hopefully it gives me a better launch off the line as well.
Infamous: Verstappen is set to have a rule change named after him as bosses decided to outlaw moving under braking - a technique which has infuriated many drivers
"We expected Mercedes to be very hard to beat and we have a good buffer over Ferrari. I think we have a good chance for tomorrow."
Ferrari were well out of it on one-lap pace, Raikkonen nearly 1.132secs slower than Hamilton and 0.227secs ahead of Vettel.
Informed observers say Vettel, whose form has slipped compared to Raikkonen in recent races, is trying to force the car to do things it cannot in his attempt to use his preferred driving style, rather than adapting to the car's behaviour.
"Kimi did a very good job today," said Vettel. "Both Q3 laps I wasn't happy. I probably pushed a bit too hard and we know that backfires on these tyres, but that is not an excuse, I should have done a better job.
It is part of the reason why I am not entirely happy with today but the gap to the cars in front is what we don't like. Coming here and seeing we are not as competitive as we thought is not good news."
The top 10 was completed by Force Indias Nico Hulkenberg, the Williams drivers Valtteri Bottas and Felipe Massa and Toro Rosso's Carlos Sainz as McLaren failed to make it through into the final session for the second consecutive race.
It was an especially poor day for Jenson Button in what is probably his last US Grand Prix - he was eliminated in the first session after McLaren sent him out on the 'soft' tyre for his first run and then encountering traffic on this final run on the super-soft.
Team-mate Fernando Alonso qualified 12th after being 0.414secs quicker than Button in the first session.
Jolyon Palmer put in a strong performance for Renault, taking 15th place, three positions and nearly 0.4secs quicker than team-mate Kevin Magnussen.
Hamilton spends a lot of time in America, and had plenty of support from the crowd