Valtteri Bottas claimed his first career pole position on Saturday when he beat his Mercedes team-mate Lewis Hamilton with a well-controlled lap in Saturday's qualifying for the Bahrain Grand Prix.
The 26-year-old Finn, who joined the team as replacement for retired 2016 world champion Nico Rosberg, made the most of a poor final lap by the Briton to claim the prime starting position for Sunday's race.
Hamilton, who was seeking his seventh successive pole position and third in a row this season, gave his team-mate a generous hug after the session.
"We will only be celebrating for a short time tonight. The most important thing is to be ready for tomorrow's race," said Bottas.
Rosberg was amongst the first to congratulate the pole sittter.
"Congrats Valtteri Bottas 1st pole! Great lap. Happy for all you guys at merc that Valtteri is going well," tweeted Rosberg.
Three-time champion Hamilton, who shares the championship lead with Sebastian Vettel and who had been quickest until the final runs, was unable to find the extra speed he needed on his second run in Q3 to retain pole position.
"Big congratulations to Valtteri," said Hamilton. "Today he was just quicker -- hats off to him."
Four-time world champion Vettel was third fastest for Ferrari, unable to make an impact on the two Mercedes men who took the front row. It was the sixth consecutive year in Bahrain that Mercedes won pole.
"Overall I was happy with how the car felt. The gap to Mercedes was bigger than I expected but we will fight tomorrow," said Vettel.
Australian Daniel Ricciardo was fourth for Red Bull ahead of Kimi Raikkonen in the second Ferrari, Max Verstappen in the second Red Bull and Nico Hulkenberg who qualified seventh for Renault.
Felipe Massa was eighth for Williams ahead of Frenchman Romain Grosjean of Haas and Briton Jolyon Palmer in the second Renault.