Vettel, whose best finish this year was second place at the season-opening Australian Grand Prix, clocked 1 minute, 32.422 seconds in his Red Bull.

The German's time was 0.98 seconds quicker than championship leader Hamilton who like Vettel is looking for his first win of the season. Hamilton has finished third in all three previous races this season.

Vettel's Red Bull teammate Mark Webber was third followed by the other McLaren of Jenson Button.

Hamilton was able to overtake Webber on his final qualifying lap and said he was relishing the chance to take on the two Red Bulls.

"I've put the car on the front row at every race this year, and I feel this was one of my best qualifying performances so far. Both my laps in Q3 were very good and I feel I got everything out of the car," Hamilton said. "Fingers crossed for tomorrow: both Red Bull drivers will be very hard to beat in the race, but we're less than a tenth behind on race pace. The start could be key." Mercedes' Nico Rosberg, who won his first F1 race in China last week, had a disappointing qualifying session after clocking the fastest time in final practice. He looked to be challenging for pole when a lock-up appeared to have cost him several grid places. He will start fifth.

"I felt very comfortable during qualifying today. However, as we have been focusing on our race pace, there is always a compromise in the qualifying set-up," Rosberg said. "I think that I'm in a good position for the race for tomorrow. I am the only driver in the top five who has a set of new option tires which can be very useful at this circuit." His teammate, seven-time world champion Michael Schumacher, didn't get past the first qualifying session and will start 18th after enduring problems with his DRS rear wing flap.

"I am obviously very disappointed to have qualified in 18th position on the grid for a race which looks to be quite competitive for us," he said. "Unfortunately on my fast lap, which was looking quite good, my DRS broke in the last sector. We tried to fix it in the garage but were not able to go out again." Toro Rosso's Daniel Ricciardo will start sixth in the highest grid position of his short F1 career.

Ferrari, meanwhile, continued to struggle with pace. Fernando Alonso qualified ninth, although he didn't run in the final qualifying session in order to save a set a tires for the race, which is expected to be particularly hard on tires. Felipe Massa was 14th after failing to get past the second qualifying session.

Force India's Paul di Resta also didn't run in Q3 and will start 10th.

Pastor Maldonado of Williams was penalized five grid places for Sunday's race after replacing his gearbox. He will start 22nd.

For much of the day drivers struggled with tough conditions on the track as temperatures reached 43 degrees Celsius (109 F) and winds whipped up sand from the surrounding desert.