Lewis Hamilton gave McLaren their first pole position in Brazil for 12 years ahead of his final grand prix for the team.

With Jenson Button alongside him, the duo combined to give McLaren their 62nd front-row lock-out as they left championship contenders Sebastian Vettel and Fernando Alonso trailing in their wake.

Vettel, who has a 13-point cushion over Alonso, will line up fourth as even Red Bull team-mate Mark Webber managed to qualify ahead of him, whilst Alonso is a disastrous eighth in his Ferrari.

Hamilton is currently on a high at the end of his 14-year association with McLaren before joining Mercedes on a three-season contract from next year after winning in the United States last week

Hamilton, yet to win in Brazil, was again brilliant as he posted a time of one minute 12.458secs for the undulating Interlagos circuit.

The 27-year-old edged team-mate Button by 0.055secs, with Webber then ahead of Vettel by almost two tenths of a second.

Felipe Massa lines up fifth in his Ferrari, followed by the Williams of Pastor Maldonado and Nico Hulkenberg in his Force India, and then Alonso.

Maldonado, however, missed a weighbridge session at the end of Q1, and could yet be penalised by the stewards, so potentially promoting Alonso at least one place.

The fifth row of the grid sees Lotus' Kimi Raikkonen alongside Nico Rosberg in his Mercedes.

A heavy rain shower 35 minutes prior to the start which lasted for around five minutes caused some consternation, and threatened to turn the grid on its head.

But with air temperatures of 24 degrees, the track was relatively dry an hour later come the start of the second session, which made for a straightforward programme.

Come the end of the middle 15-minute period, hopes for Force India's Paul di Resta of making the top 10 were dashed as the Scot will line up 11th after missing the cut by 0.073secs.

Di Resta starts ahead of Williams' Bruno Senna and Sergio Perez on his last outing for Sauber before joining McLaren, with Michael Schumacher 14th at the end of his final qualifying run in F1 and for Mercedes ahead of retiring for a second time.

Sauber's Kamui Kobayashi, without a seat for next season after the team announced Esteban Gutierrez is to step up, starts 15th ahead of Toro Rosso pairing Daniel Ricciardo and Jean-Eric Vergne.

The worst of the conditions were at the start of Q1, throughout which a dry line eventually materialised and the lap times tumbled.

With his future on the line, as he has yet to be confirmed for 2013, Lotus' Romain Grosjean made a critical mistake by clipping the back of the HRT of Pedro de la Rosa, resulting in him losing his front wing, and a stewards' investigation.

Although the Frenchman was able to return to the pits for a new nose and post one final quick lap, it was not enough to lift him out of the bottom seven for the first time this season.

"He (De la Rosa) didn't see me and there was no space to squeeze between him and the wall," said Grosjean.

"It's a disaster for tomorrow because we have a very good car."

It means Grosjean will start 18th ahead of Caterham duo Vitaly Petrov and Heikki Kovalainen, both fighting for the one remaining seat with the team after Charles Pic was confirmed yesterday.

On his final outing for Marussia, Pic was out-qualified by team-mate Timo Glock, the duo starting 21st and 22nd ahead of the HRTs on the back row, with Narain Karthikeyan in front of De la Rosa.