Hamilton’s team-mate at Mercedes Nico Rosberg was third, followed by Fernando Alonso in a Ferrari at the Sepang International Circuit.

Lewis Hamilton in a Mercedes captured pole position ahead of Red Bull’s Sebastian Vettel in a rain-affected qualifying session on Saturday for Sunday’s Malaysian Formula One Grand Prix.

Hamilton’s team-mate Nico Rosberg — who won the opening race of the season in Australia — was third, followed by Fernando Alonso in a Ferrari at the Sepang International Circuit.

It was Hamilton’s 33rd pole position, equalling Jim Clark’s British record and making it two poles out of two following the Australian Grand Prix two weeks ago.

“I’m really happy with how well we’ve done over the weekend, but today was incredible — how heavy was the rain?” Hamilton said.

“It was tricky out there for everyone because at the end it was almost impossible to see. I couldn’t see where the track went, where the corners were, where to break. I had to bail out of my final fast lap, so it was very close.” Torrential rain had delayed qualifying by 50 minutes, and with showers returning after the start drivers had to cope with wet conditions and poor visibility throughout the three sessions.

Hamilton posted a fastest time of 1 minute 59.431 seconds, 0.055 seconds ahead of four-time world champion Vettel, who won in Sepang from pole last year.

The wet conditions suited the Red Bulls, and Vettel, who retired during the Australian GP, was delighted to be on the front row for Sunday’s race after he had been called back in the first qualifying session with a technical problem.

“At the beginning of Q1, the heart beat was rising very quickly when we realised there was an issue,” Vettel said.

“I came in, we restarted the car and that seemed to solve the problem. After that it was fine. It was good to go out and get another feel in the wet conditions.

“Q3 was not perfect. I would have loved to have a second go. My first attempt, I felt there was time to gain here and there. It was very close, too close. I should be on the good side for tomorrow but it depends on how good the start is. I’m happy with the result.” Team-mate Daniel Ricciardo, who was second in Australia only to be disqualified over a fuel-flow infringement, also underlined Red Bull’s performance with fifth.

The remaining top 10 places were taken by Kimi Raikkonen (Ferrari), Nico Huelkenberg (Force India), Kevin Magnussen (McLaren), Jean-Eric Vergne (Toro Rosso) and Jenson Button (McLaren), whose gamble to go with intermediate tyres rather than wets failed to pay off.

Toro Rosso’s Daniil Kvyat, Esteban Gutierrez (Sauber), Felipe Massa (Williams), Sergio Perez (Force India), Valtteri Bottas (Williams) and Romain Grosjean (Lotus) went out in the second session.

Kvyat and Alonso had made contact on a turn in the second session, bringing out the red flag, but both were able to continue after repairs.

The red flag was also out near the end of the first qualifying session when Swede Marcus Ericsson in a Caterham slid off into a crash barrier and back onto the track.

The session was not restarted as Ericsson’s badly damaged car was lifted off the track, leaving Pastor Maldonado (Lotus), Adrian Sutil (Sauber), Jules Bianchi (Marussia), Kamui Kobayashi (Caterham) and Max Chilton (Marussia) also missing the cut.