Nico Rosberg believed he had done enough to beat Formula 1 title rival Lewis Hamilton to pole position for the Spanish Grand Prix.
The 28-year-old was fastest in both Q1 and Q2, but was pipped to pole by his Mercedes team-mate by 0.168 seconds.
Rosberg was a tenth-and-a-half faster than Hamilton in the final sector, but was outpaced.
"I was surprised because my lap was good and I thought I had it," said Rosberg.
"Of course, I was never underestimating him because I knew that he was just not getting his laps together.
"He was quick all along, but just not putting in the lap times that he would be able to do.
"But I did think my lap was good enough and I was surprised and disappointed that he beat me to it."
HAMILTON STRUGGLED MORE IN QUALIFYING
Hamilton admitted that after a strong performance during Friday practice, he has struggled more today.
But he was delighted to have pulled a good lap out of the bag to turn the tables, although he warned that set-up differences between himself and Rosberg could mean things change in the race.
"When you have been on the back foot and your team-mate has the upper hand but you manage to pull out an ace card just for that last lap, it's a great feeling," said Hamilton.
"We have a lot more work to do now to really think of where we need to go for tomorrow, what we can do within the parameters and try and see if we can hold onto it because Nico has got a slightly different setup.
"Which one is going to work tomorrow, we will see."