Charles Leclerc did not believe Ferrari could topple Red Bull before securing pole position for the Azerbaijan Grand Prix.
The Ferrari driver had traded the top spot in each of the three practice sessions with Red Bull's Sergio Perez.
When qualifying began, Red Bull appeared to have the advantage, with the Mexican and his championship-leading team-mate Max Verstappen leading the way.
When it mattered, however, Leclerc delivered a stunning lap to finish three-tenths of a second ahead of Perez to secure his fourth consecutive pole, second in Baku and 15th of his F1 career.
"Obviously, all pole positions feel good but this one, I probably did not expect it because I expected that Red Bull were stronger," said Leclerc.
"Especially in Q1 and Q2, I really struggled to see that we were faster but then in the last lap, everything came together and I managed to do a good lap, so I'm extremely happy."
Ferrari race pace improved with upgrades
Although Leclerc has started the last three races from pole, he has failed to convert any of these positions into a race victory.
But the Monégasque is confident this could change on Sunday, with the benefit of Ferrari's recent upgrades masked by reliability problems in Spain and the weather in Monaco.
"I'm really excited for tomorrow," added Leclerc. "I think we will have quite a lot of answers tomorrow because tyre management is a big thing here.
"In Barcelona and Monaco, we were managing it well even though in Monaco it was difficult to see anything.
"But overall, our race pace has gone a step up since we brought the upgrades so it will be very interesting."