Updated

Sepang, Malaysia (SportsNetwork.com) - Lewis Hamilton from Mercedes edged Red Bull's Sebastian Vettel by a slim margin to win Saturday's rain-soaked qualifying for the Malaysian Grand Prix.

Qualifying at Sepang International Circuit was delayed more than 50 minutes due to a torrential downpour.

Hamilton claimed his second pole position in as many grand prix this season with a lap in 1 minute, 59.431 seconds. His 33rd career Formula One pole placed him in a tie with Jim Clark for most pole wins among British drivers in the history of the sport.

"I'm really happy with the job the team has done throughout the weekend," Hamilton said. "Today was just incredible, firstly, how much it rained before qualifying, and then during the session, it was very tricky out there for everyone, particularly at the end. It was almost impossible to see. I couldn't do my last lap. I couldn't see where the track went, didn't know where the corners were and where to brake."

Two weeks ago, Hamilton started on pole for the Australian Grand Prix but suffered engine failure on the opening lap, which forced him to retire. Hamilton has yet to win the Malaysian GP. He finished third after starting on pole in this event in 2012.

Vettel, the four-time defending F1 world champion, has rebounded nicely from the Australian GP with a second-place finish in qualifying. His lap was just 0.055 seconds behind Hamilton. Vettel qualified 13th in Australia. He also retired early in that race when his power unit failed.

During the first round in qualifying here in Malaysia, Vettel experienced an energy store problem. His Red Bull team was able to correct the problem and quickly put him back on track.

"At the beginning of Q1, the heartbeat was rising very quickly when we realized there was an issue," Vettel said. "I came in [to the garage], and we restarted the car, which seemed to solve the problem. After that, it was fine.

"It was good to go out and get another feel for the car in the wet conditions. It was very tricky, for sure. Q3 was not perfect. I would've loved to have a second go. On my first attempt, I felt there was a little bit of time to gain here and there. It was very close, too close."

Vettel has won three of the last four Malaysian GPs, including a victory in this race one year ago.

Hamilton's teammate, Nico Rosberg, qualified third. Rosberg won the Australian GP.

"It's a decent place to be in, third place," Rosberg said. "The race is going to be long [Sunday]. Who knows what the weather is going to do? I'm just looking forward to tomorrow and try to make the most of it again."

Fernando Alonso from Ferrari rebounded from an incident with Toro Rosso's Daniil Kvyat to finish fourth in qualifying. Both drivers made contact late in Q1 when Kvyat, a rookie this season, locked up and slid into Alonso, who sustained slight damage to his front right suspension. Ferrari made expeditious repairs to his car.

Daniel Ricciardo from Red Bull qualified fifth, followed by Ferrari's Kim Raikkonen and Nico Hulkenberg from Force India. McLaren's Kevin Magnussen, fresh off a second-place finish in Australia, will start eighth in the Malaysian GP.