Charles Leclerc claimed his third pole position in 2023 after a dramatic end to qualifying at the United States Grand Prix.
In a tight session, it appeared Max Verstappen had pulled out another magic lap as he beat the Monegasque's benchmark of 1m34.723s by just 0.005s.
But the Red Bull driver would have his best time deleted for track limits, giving pole back to Leclerc.
Lando Norris put McLaren on the front row in second, as Lewis Hamilton completed the top three.
Q1
The first segment was all about evolution as lap times improved dramatically during the 18 minutes.
At the front, Hamilton showed the promise of Mercedes' latest floor upgrade by finishing fastest ahead of Norris and Verstappen in third.
But there was frustration in the knockout zone as both Aston Martins were eliminated with Fernando Alonso 17th and Lance Stroll 19th.
Nico Hulkenberg highlighted how much the pace increased by falling from P1 to missing out in 16th place for Haas.
Alex Albon could only manage P18 and Logan Sargeant was slowest after being compromised by having his first run deleted for track limits.
Q2
'CarLando' were under pressure initially in Q2, but both Sainz and Norris would comfortably improve on their second attempt to reach Q3.
Leclerc finished P1 in the second Ferrari, beating Verstappen by just 0.004s with Hamilton in third.
George Russell briefly looked at risk but squeaked through in ninth, just ahead of Sergio Perez in P10.
The Briton's lap demoted Yuki Tsunoda to 11th in the AlphaTauri, while teammate Daniel Ricciardo was only 15th after his final lap was deleted.
Zhou Guanyu and Valtteri Bottas sat 12th and 13th in the Alfa Romeos, with Kevin Magnussen 14th as neither Haas reached Q3.
Q3
Leclerc sat in provisional pole after the first runs in Q3 with Hamilton just 0.056s in P2 for Mercedes.
Verstappen was frustrated by dirty air from his teammate Perez destablising his car at the final corner as he sat third, a quarter of a second behind.
The world champion's session got worse as Max appeared to have snatched pole by just 0.005s on his second run, but would lose the time for track limits at the penultimate corner.
As a result, Leclerc will start Sunday's race from P1 with Norris alongside after a superb final lap by the McLaren driver.
Hamilton follows in third ahead of Sainz and Russell in fifth. Verstappen's first lap was only good enough for P6, followed by former teammate Pierre Gasly in seventh.
Esteban Ocon was eighth in the second Alpine, as Perez and Oscar Piastri rounded out the top 10.