Mercedes driver Lewis Hamilton will start from pole position for the fourth time this season after setting the fastest time in qualifying at the Hungarian Grand Prix on Saturday.
The British driver sounded stunned when his team announced over the race radio that he had beaten three-time Formula One champion Sebastian Vettel right at the end of the session.
"I'm really surprised," said Hamilton, who is looking for his first race win of the season. "We've got a steep hill to climb tomorrow with these tires and these conditions."
Hamilton clocked 1 minute, 19.388 seconds, just ahead of Vettel's best lap of 1:19.426.
"There wasn't much missing. Lewis did a really good job," said Vettel, who has never won in Hungary. "It's stupid to sit here and say 'We should have done this and we should have done that.' I could be on pole, but still I think it puts us in a great place for tomorrow."
Vettel, the defending champion, remains confident however that he can follow up his success at the German GP three weeks ago and clinch his fifth win of the campaign.
"We should have a good race because the car feels fine," he said.
Lotus driver Romain Grosjean, who was fastest in the final practice session, qualified third in 1:19.595 for his best grid position of the season.
Red Bull and Mercedes have combined to take all 10 poles this season - with Vettel getting all three for Red Bull. But Mercedes has a low conversion rate from the front of the grid.
"Pole definitely helps, of course, because it's very difficult to follow here, but it is a long way down to turn one," Hamilton said. "If you can hold pole into turn one then it will be advantageous, but as always the race is going to be about the tires and trying to hold on to them."
Nico Rosberg has won two races, while Hamilton is still looking to finish higher than third in a Mercedes that has great speed but lacks durability over a whole race.
"It's been the same for a long time. It's not a surprise for us," Hamilton said. "It's great to have the pole position but it doesn't mean anything, it's in the race where we score points."
Hamilton, the 2008 F1 champion, will hope that the Hungaroring helps him end his winless run. He won here last year for his third victory on the track but has not won a race since winning the United States GP last November.
"I've been fortunate to have a good car for quite a few years with McLaren," Hamilton said. "These guys (Vettel and Grosjean) are going to be ridiculously fast, so trying to keep in front or hold onto them is going to be the challenge."
Grosjean has found his form recently, finishing third at the German GP three weeks ago to end a miserable run in which he failed to place inside the top 15 for four Formula One races.
"I quite like this circuit, but it doesn't mean much unfortunately. The last lap was a pretty good lap," said Grosjean, who was third in Hungary last year. "I'm happy to be back in the top three in qualifying. It was a good lap and we're happy with that."
The track temperature on the Hungaroring circuit reached 50 degrees Celsius (122 Fahrenheit), and similarly stifling temperatures are expected for Sunday's race with tire degradation expected to play a key part in the result.
Red Bull's Mark Webber did not make a run in Q3 because of a problem with KERS, which can boost acceleration, and will start from 10th.
Vettel moved to the top in Q2 with Lotus' Kimi Raikkonen and Hamilton close behind. But a late run saw both Mercedes take the top two places.
In a frantic last minute, Sergio Perez, Mark Webber and Felipe Massa made it through to Q3. Perez had crashed right at the end of the third practice run and McLaren engineers had to work quickly to get his car ready for qualifying.
Meanwhile, former champion Jenson Button missed the cut for Q3, finishing in 13th.
Paul di Resta had a bad run in Q1. The British driver finished 18th.