Lewis Hamilton took pole position on Saturday in qualifying for the Spanish Grand Prix, while Sebastian Vettel managed to nab second and deny Mercedes a clean-sweep of the front-row.
The Mercedes driver's 55th career win was hard-fought and tense, with Ferrari's Vettel seizing the lead from Hamilton at the start and in the hunt all the way as the tire strategies played out.
Dutch teenager Max Verstappen, who became Formula One's youngest victor in Spain previous year after Hamilton and then team mate and 2016 champion Nico Rosberg collided at the start, will start Sunday's race in fifth place for Red Bull.
Red Bull Racing were "best of the rest", with Max Verstappen fifth, around half a second off pole and nearly the same amount up on team-mate Daniel Ricciardo in P6. "Then, maybe you should ask the Italians; they seem to know more than I do". It's a miracle they got me out.
"He still somehow managed to get a decent exit [from the chicane] so I couldn't do it first time", said Vettel.
"It's going to be a tough race tomorrow that's for sure", Hamilton, 32, said. "A good start looks always good, so we'll see, but I am confident for tomorrow and I always try to keep a smile".
Red Bull's Max Verstappen and Daniel Ricciardo followed, while Fernando Alonso produced a remarkable performance and will start seventh on home soil.
Valtteri Bottas, the second vehicle for the Silver Arrows, will start from third after ending up 0.224secs behind Hamilton and the Finn will need a big improvement to record back-to-back wins after his triumph in Russian Federation.
Despite an engine change just prior to the start of qualifying, Vettel missed out on pole due to a lock-up on turn two at the Circuit de Catalunya and was left ruing a driving error which extended his record of never starting the race at the head of the field. By comparison Bottas locked up and ran wide in turn 1 on his first flying lap, and was forced to run a put more wear on his race tyres to put in a lap just under a tenth off his team mate.
The three-time champion Briton faced a powerful challenged from Sebastian Vettel of Ferrari.
Vettel eventually made it past Bottas with a bold move into the first corner.
Force India pair Sergio Perez and Esteban Ocon finished fourth and fifth respectively, the best result for both drivers this year.
Force India got both its cars into the top 10 again, sandwiching Felipe Massa's ninth placed Williams. "I have been racing for 24, 25 years and it feels like the first win".
"I was surprised that when I came out we were so close", Vettel said. Carlos Sainz was then 12th for Toro Rosso - 0.042secs further back, and only 0.026secs up on Nico Hulkenberg's Renault in P13.