Sebastian Vettel took a third successive pole position for Red Bull after clocking the fastest time during Saturday's qualifying session for Sunday's European Grand Prix.
It was the 24-year-old's third pole of the year and 33rd of his career, equalling F1 legends Alain Prost and Jim Clark.
After struggling for pace on Friday, pole position looked unlikely for the young German, but a stunning lap towards the end of the final session secured his place on the front row beside second-fastest Lewis Hamilton of McLaren.
Vettel clocked a fastest lap time of one minute 38.086 at the Valencia street circuit, almost half a second faster than Hamilton and third-placed Pastor Maldonado of Williams.
Vettel said: "We had one shot there at the end which turned out to be a very good lap. Q1 and Q2 were not to our liking.
"We were struggling to find the balance we did have in practice. It was a good recovery. We had to put a second set of options in Q2. It was the right call because I don't think my first lap was good enough."
Lotus drivers Frenchman Romain Grosjean and Kimi Raikkonen took fourth and fifth ahead of Nico Rosberg of Mercedes.
Kamui Kobayashi was seventh quickest for Sauber followed by Nico Hulkenberg of Williams and Jenson Button in the second McLaren.
Scotsman Paul Di Resta looked set for a top five start but he locked his brakes towards the end of the lap and had to settle for tenth position.
Hamilton leads the drivers' standings on 88 points from Ferrari's Fernando Alonso, who failed to make it into Q3, two points adrift and Vettel lying third on 85 points.
Vettel has won here the last two seasons having set off from pole each time.