Lewis Hamilton has beaten Mercedes team-mate Valtteri Bottas to pole position at the French Grand Prix.
The world champion was 0.286 seconds quicker than the Finn, whose title challenge is in danger of fizzling out before half way through the season.
Bottas heads into the race 29 points behind Hamilton and needs to beat him to get his challenge back on track.
Behind them, Ferrari's Charles Leclerc was third while team-mate Sebastian Vettel could manage only seventh.
Bottas had the edge - until it mattered
Mercedes were untouchable at the front, as they have looked all weekend on this demanding track in the Provencal hills.
Bottas looked to have an edge on Hamilton through practice, but when it mattered the Briton made it count, as he so often does.
It was Hamilton's third pole of the season, matching Bottas' tally.
In the final qualifying session, Hamilton was 0.157secs quicker than Bottas on the first runs.
Bottas had a scrappy lap on his second attempt and failed to improve, while Hamilton took a few extra fractions off his time, despite a small error in the penultimate corner.
More misery for Vettel
Leclerc had his best qualifying since the Bahrain Grand Prix back in March and beat Vettel for only the second time this season, finally ending a run of bad luck and errors.
He looked quicker than Vettel all Saturday and delivered a strong performance in qualifying to be best of the rest behind Mercedes, albeit 0.646secs adrift.
Vettel, though, had a messy qualifying. He had an untidy first lap, with a big snap at the rear at the first corner before running wide at Turn Six on to the Mistral straight. His gearbox then missed the upshift to fourth out of the Mistral chicane, and he aborted the lap.
That meant he had it all to do on his second run, but he was unable to deliver and ended up 0.834secs behind Leclerc.
- Can Sebastian Vettel triumph after controversial race in Canada?
- Chequered Flag podcast: French Grand Prix Preview
Anyone know why McLaren are so fast?
But the stars of qualifying were arguably the McLarens, with Lando Norris and Carlos Sainz closely matched and only just failing to pip Max Verstappen for fourth.
Red Bull were struggling - Verstappen was over a second off the pace - but even so McLaren were not expected to be so close.
"I'm happy with P5," said Norris, who started his F1 career this season. "It's my best qualifying."
But he did express some surprise about their pace. "We don't have any big upgrades. For whatever reason, it seems to be working very well. Hopefully we can identify (why) and bring it to the next races."
Sainz added: "It is good news. We are bringing upgrades every race and the car is responding, it feels alive. Let's try to keep it for tomorrow."
Renault would like to know
McLaren's pace was also embarrassing for the factory Renault team, their engine supplier.
Renault came to their home race with a big chassis upgrade and were expecting to move forward. They achieved their aim of being closer to Red Bull, but did not expect McLaren to be in between them.
Daniel Ricciardo was eighth, 0.5secs slower than Norris, with Red Bull's Pierre Gasly ninth and the Alfa Romeo of Antonio Giovinazzi completing the top 10.
The other British driver, George Russell, did a stellar job for Williams. He missed all of final practice because of an engine problem - and had already had to stand down for first practice to make way for reserve driver Nicholas Latifi - but qualified 19th, 0.416secs quicker than team-mate Robert Kubica.
However, Russell will start behind the Pole because of a grid penalty for using too many engine parts this season, after Williams had to change his control electronics and energy store to resolve the problems in final practice.
What they said
Hamilton: "Valtteri has been quick all weekend, and the last two laps were the ones. The last one I was up nearly a second and I lost it in the second to last corner."
Bottas: "It has been really close all weekend, down to fine details, but in final qualifying the wind changed and that made the track different and my lines did not work in a couple of places."
Vettel: "In the end I didn't get the best out of the car but it was difficult because some laps it was good and it was just coming and other laps I just didn't have the grip I had before. Shame it happened in Q3 but that's what it is."