Lewis Hamilton narrowly beat Mercedes team-mate Nico Rosberg to what could be a crucial pole position at the Brazilian Grand Prix.
Hamilton, who must stop Rosberg winning to take the title fight to the final race of the season, was 0.102 seconds quicker in a tense battle.
Rosberg heads into the race with a 19-point advantage and will be crowned champion if he gains seven points or more on Hamilton.
The Finn was 0.668secs behind Hamilton and ahead of Red Bull's Max Verstappen. Ferrari's Sebastian Vettel and Red Bull's Daniel Ricciardo completed the top six.
Sunday's race is live at 16:00 GMT on the BBC Sport website and Radio 5 live.
The rain that had threatened throughout the day held off for qualifying, with only occasional light drizzle that did not affect the track.
But heavier and more persistent rain is predicted in Sao Paulo for the race on Sunday, which could bring the Red Bulls and Ferraris into play in the battle between the Mercedes drivers.
Hamilton looked on top form throughout qualifying, topping both the first and second sessions and leading by 0.162secs after the first runs in the top 10 shootout.
Both men improved on their final runs but Hamilton had just enough to hold off the German.
Hamilton, who has never won in Brazil, said: "I felt quite comfortable in qualifying as I have done all weekend. Nico has been getting quicker and quicker but I have generally had him covered.
"This is the best I could have hoped for coming here. I think it is only my second pole here."
Hamilton said he "did not really mind" if rained, adding: "I am ready for anything."
Rosberg said: "It was an exciting qualifying, very close, Lewis was just marginally quicker in the end. My lap was very good as well, but as we have seen this year, pole is not always the guy who wins the race."
Impressive from the old guard
Mercedes were in a different league from the rest as Raikkonen edged a tight battle for third between the Ferrari and Red Bull drivers with a strong final lap.
The Finn was just 0.081secs quicker than Verstappen, with Vettel a further 0.01secs adrift and Ricciardo 0.045secs behind him.
That's three poles now for Mercedes - same as Renault, here enjoying their first with Jean-Pierre Jabouille in 1980. Source: Forix
Haas driver Romain Grosjean took an impressive seventh, ahead of the Force Indias of Nico Hulkenberg and Sergio Perez, who leapfrogged McLaren's Fernando Alonso with their final laps.
But it was an improved performance from McLaren after a disappointing time in the past three races, with their most competitive-looking performance for some time. Alonso was in the top 10 throughout qualifying.
Alonso's team-mate Jenson Button, likely racing in his penultimate grand prix, was knocked out in first qualifying, in which he was 0.576secs slower than the Spaniard and qualified 17th.
Button complained of "very little front grip", but also of high-speed oversteer, a characteristic with which he has never been comfortable.
The gulf between the two was illustrated by the fact Alonso was quick enough on his first lap to not even feel the need to go out again to make sure of his place in second qualifying, for perhaps the first time in McLaren's new Honda era.
Jolyon Palmer put in another impressive performance for Renault, who have announced this week they are retaining him for 2017.
The Englishman qualified 16th, ahead of team-mate Kevin Magnussen, who was 18th, for the third time in four races.
Brazilian Grand Prix qualifying results
Brazilian Grand Prix coverage details
You need to be a member of The Vintage Racing League to add comments!
Join The Vintage Racing League