Lewis Hamilton has the chance to bow out on an incredible high after earning McLaren their first pole position in Brazil for 12 years ahead of his final Formula One race for the Woking-based team today.

Having won last weekend's US Grand Prix, Hamilton has the opportunity to register back-to-back victories before ending a 14-year association to join Mercedes.

Starting alongside him in Sao Paulo will be Jenson Button after the duo combined to give McLaren their 62nd front-row lock-out, leaving championship contenders Sebastian Vettel and Fernando Alonso in their wake.

Vettel, who has a 13-point cushion over Alonso, will line up fourth – beside Red Bull team-mate Mark Webber – while Alonso is seventh in his Ferrari. The Spaniard qualified eighth but moved up one when Williams' Pastor Maldonado was handed a 10-place grid penalty after receiving his third reprimand of the season for missing a weighbridge session at the end of Q1.

Hamilton said: "It's been a good weekend so far and I'm grateful to be able to put the car on the front row. To have a one-two with Jenson, that's a fantastic job by the team. I'm grateful for all the opportunities the team have given me and hopefully we can turn it into a positive."

Rain is forecast for today and Hamilton admitted: "We don't know what the hell is going to happen. The weather is going to be tricky, it's going to make it more of a lottery. I don't mind driving in the rain. I love it, and here in Brazil it's quite a special race when it rains.

"But we'll have to wait and see, make sure we get our tyre pressures right, brake temper-atures correct and try and steer clear of any big puddles. We've put ourselves in a good position, so we'll work together as a team, and we'll make sure we do everything to get the top result."

Button, who qualified 0.055secs behind Hamilton's time of one minute 12.458secs to clinch his highest Interlagos grid slot, dropped a broad hint that he is unhappy to be losing his team-mate.

"I'm very happy to be on the front row because my last couple of qualifying sessions have been a bit tricky," Button said. "To both be on the front row for Lewis' last grand prix with the team ... the team is in great shape, and it's a pity things have to change, but things do change. We're here to win, the same as every other driver. That's the aim for both of us, and we'll see what we can do. The car seems to be working very well in the dry, our long run pace is pretty good.

"But there is a massive chance of rain tomorrow and that just throws it up in the air for us, which is quite exciting. But for two people [Vettel and Alonso], their stress levels are going to be through the roof.

"For us in starting near the front, it's hopefully going to be a very exciting race. We just have to hope the rain level is OK for us to actually race, which is always the worry here at Interlagos."

Alonso has to finish on the podium to have any hope of taking his third title, leaving him with a mountain to climb and Vettel sounding confident. The German said: "As soon as the lights go off I will try to attack the guys at the front. On top of that there might be things happening, with the weather forecast being what it is, so I won't be looking left and right to be honest."

Felipe Massa lines up fifth in his Ferrari, with Nico Hulkenberg in his Force India sixth, and then Alonso. Force India's Paul Di Resta starts 10th, thanks to the Maldonado penalty, having just missed the top-10 cut by 0.073secs.

Lotus's Roman Grosjean, who qualified 18th, was the subject of a stewards' investigation after clipping the back of Pedro de la Rosa's HRT, resulting in the loss of his front wing.