Formula One world championship leader Nico Rosberg took pole position for the Hungarian Grand Prix on Saturday while Mercedes team-mate and title rival Lewis Hamilton saw his hopes go up in flames.

Hamilton, 14 points behind Rosberg after 10 races, has won in Hungary for the past two years and four times in total and was the favourite for pole and the race after setting the pace in practice.

Instead, the Briton was set to start last and from the pitlane after his car caught fire with the session barely started.

Red Bull's quadruple world champion Sebastian Vettel qualified second, equalling his best grid placing of the season, on an all-German front row.

Finland's Valtteri Bottas starts third in a Williams with Australian Daniel Ricciardo fourth for Red Bull on an overcast afternoon that saw light rain fall between the second and final phase of qualifying.

For the second race in a row, Rosberg was left with mixed emotions - happy to be in the top slot with every chance of extending his overall lead - but saying also that he felt cheated of a battle with his team-mate.

"It's a pity for the team, not a good thing ... I would prefer to be out there battling Lewis," he told reporters. "That would have been the maximum adrenalin rush."

Hamilton suffers string of setbacks

Hamilton, winner of five races to Rosberg's four, has had a run of bad luck with two retirements to the German's sole blank and has also endured a string of qualifying setbacks going back six races.

At Hockenheim last Saturday, he crashed out of qualifying at the same point when a front brake disc failed and had to start in 20th place.

That triggered a thrilling charge through the field on Sunday to third place but the slow and twisty Hungaroring is a far more difficult track to overtake on.

"There's a lot going through my mind, but I just have to try to turn it into positives until tomorrow," Hamilton, whose car will need a change of engine and gearbox with accompanying five place penalty, told the BBC.

"I think it's getting to the point beyond bad luck - it's something else. We just need to do better," added the 2008 world champion.

While Hamilton's blaze - caused by a suspected fuel leak - was the main talking point, there were other shocks in an eventful session that ended with Mercedes' 10th pole in 11 races.

Frenchman Jules Bianchi, a Ferrari academy driver who races for struggling Marussia, qualified 16th and ahead of Ferrari's 2007 champion Kimi Raikkonen at one of the Finn's strongest circuits.

Ferrari had mistakenly assumed both their drivers were safely through the first phase and did not send them out for second runs - and then saw Bianchi pip Raikkonen when there was nothing they could do about it.

Raikkonen's double world champion team mate Fernando Alonso will start fifth and with Brazilian Felipe Massa, who was replaced by Raikkonen at the Italian team, alongside.

The final phase was halted for some eight minutes after Danish rookie Kevin Magnussen crashed his McLaren heavily into the barriers on a surface made slippery by the sudden shower.

Venezuelan Pastor Maldonado, who has not scored a point so far this season, was the first out of qualifying after parking up his Lotus.