(CNN) -- The scene is set for a thrilling climax to the 2012 Formula One season after Lewis Hamilton upstaged title contenders Sebastian Vettel and Fernando Alonso by claiming pole position for Sunday's Brazilian Grand Prix.
Hamilton, who beat the duo to win the penultimate race in the U.S. last weekend, headed off McLaren teammate Jenson Button in Saturday's qualifying at Interlagos.
Championship leader Vettel had to settle for fourth on the grid behind Red Bull teammate Mark Webber, while second-placed Alonso was back in eighth -- later bumped up to seventh -- as he was again out-qualified by Ferrari colleague Felipe Massa.
Alonso was handed a small boost when Williams' Pastor Maldonado was relegated from sixth to 16th after receiving a reprimand for failing to take his car to the weighbridge when requested to do so by stewards.
Vettel will clinch his third successive title if Alonso -- also seeking to become the sport's youngest triple champion -- finishes outside the top three.
The German, who holds a 13-point lead after finishing second in Austin, will be champion whatever his rival's result if he places in the top four.
However, with rain expected on Sunday the title race is far from over -- especially as Alonso has overcome poor qualifying form many times this season to consistently finish on the podium.
"Ninth in the USA and eighth here so more or less as I expected," he said. "I will try to achieve the podiums which we achieved in Abu Dhabi and Austin from those positions.
"No big changes in our race. F1 is dominated by aerodynamics. We ran with maximum downforce in dry and same in the wet so no big changes today, no gamble. It is minimum changes."
The Spaniard, who won his two titles with Renault in 2005 and 2006, triumphed in the season's only rain-affected race in Malaysia in March.
He was helped in Texas when Ferrari gave Massa an automatic five-place grid penalty by changing his gearbox, but this time the Brazilian will be looking to impress on his home track -- where he was denied the 2008 world title by Hamilton on the last lap despite winning the race.
"I will try everything I can," said Massa, who qualified fifth ahead of Venezuelan driver Maldonado.
"I don't know what the weather will be but everyone says it is wet. We know Interlagos and that anything can happen. The only thing I need to do is concentrate on my own race in front of my own people."
Vettel has recovered from a difficult start to the season, making the most of improvements provided by Red Bull designer Adrian Newey to win four races in a row before finishing third from a pit-lane start in Abu Dhabi and then second last weekend.
"It was not quick enough and I know I could have done a little better," the 25-year-old said. "But let's wait and see what happens tomorrow."
Hamilton claimed his seventh pole this season and is seeking to end his career-long spell at McLaren with a second successive victory.
"I am grateful to be able to put the car on the front row and to have had my last qualifying with McLaren as a one-two, it is a fantastic job by the team," said the Englishman after the team locked out the front row for a record 67th time.
"I think the weather will be tricky tomorrow, it will make it more of a lottery."
Next season Hamilton will move to Mercedes to replace Michael Schumacher, who will start the final race of his career 13th out of 24 drivers.
The seven-time world champion, who was fourth at Interlagos before his first retirement in 2006, missed out on the third and final qualifying session.
The 43-year-old was almost two seconds slower than Hamilton's leading time of 1:12.458, finishing behind the Englishman's replacement at McLaren next year -- Sergio Perez of Sauber.
"I am not particularly happy about the qualifying session," Schumacher said.
"We might have compromised the car too much for the rain which is expected for tomorrow and was also forecast for qualifying.
"My starting position is now quite tricky, and I will have to see what we can make out of it.
Sauber's new signing Nico Hulkenberg will start sixth in his final race for Force India at a track where the German claimed a surprise pole position in 2010.
Former world champion Kimi Raikkonen, seeking to hold off Hamilton for third place in the drivers' standings, will be eighth on the grid ahead of Mercedes' Nico Rosberg and Force India's Paul di Resta.
Bruno Senna will start 11th as he seeks to earn a new deal with Williams at the circuit where his three-time world champion uncle Ayrton made his name as a Brazilian folk hero.