Lewis Hamilton's hopes of leading Formula One into the August break took a knock on Saturday after Ferrari swept the front row in Hungarian Grand Prix qualifying with the Mercedes driver fourth.

"I think it's going to be an easy breeze for them tomorrow," said the Briton, who is one point adrift of Ferrari's pole position man and championship leader Sebastian Vettel after 10 of 20 races.

"You can't overtake here so it's most likely going to be a train unless we can do something on strategy."

History suggests he might have cause to feel gloomy but if anyone can find a way to win against the odds at the Hungaroring, it has to be Hamilton.

He is the only driver to have won there from pole since Michael Schumacher with Ferrari in 2004, and the Briton has the best record of any current driver at the Hungaroring with five victories.

Past form is no guarantee of future success, however, and Mercedes had to recognise that Ferrari were back to their best and enjoying their most dominant Hungarian qualifying since Schumacher's day.

With Kimi Raikkonen qualifying second, a clean start for both could see Vettel pull away while the Finn keeps the rest in check. The other Finn on the grid, Valtteri Bottas, starts third for Mercedes.

Memories of Monaco in May, where Ferrari romped to a one-two finish while Hamilton could manage only seventh, remained raw but Mercedes team boss Toto Wolff said the situation was not that dramatic.

"In Monte Carlo we had much more severe problems," he told reporters.

"We have become much closer to Ferrari on this type of circuit."

Hamilton had hopes of equalling Schumacher's all-time record of 68 poles on Saturday and was fastest in the second of the three qualifying sessions, despite complaining of tyre vibrations.

But then it all unravelled, the triple champion running wide on his first flying lap of the last phase, leaving him with no safety net and an all-or-nothing attempt to beat Vettel, who had already set an absolute track record.

"I don't think there was any moment that we had a shot of pole," he said. "We couldn't match the Ferrari's time today.

"They obviously made an improvement this weekend and deserved to get pole."

Hamilton compared the final phase to a tennis match where a player tries to serve an ace and fails. The second serve, or lap, was less aggressive.

"You just try and get as good a time in as you can, but with less risk," he said.