Daniel Ricciardo will start the Mexican Grand Prix from pole position after narrowly beating teammate Max Verstappen.
The Australian set a new lap record with a time of 1:14.759 to edge ahead of Verstappen, giving Red Bull their first front row lockout in over five years.
Lewis Hamilton completed the top three, and will start alongside title rival Sebastian Vettel, who must win tomorrow to keep his championship hopes alive.
Fernando Alonso found himself at the bottom of the standings late in Q1 after his earlier time was disallowed for a breach of track limits, but he was able to post a time right at the end of the session to get himself through to the second part of qualifying.
His teammate Stoffel Vandoorne dropped out in the opening session for the 12th straight race, with both Williams and both Haas drivers also missing out on a spot in Q2.
Both Saubers and Renaults joined the top three teams in the final part of qualifying, with Nico Hulkenberg proving to be the best of the rest as he qualified seventh.
There was disappointment for the home fans in Q2 as Sergio Perez missed out on a spot in the top 10, with both Force India cars failing to make it through to Q3.
Provisional qualifying result:
1 Daniel Ricciardo (Red Bull)
2. Max Verstappen (Red Bull)
3. Lewis Hamilton (Mercedes)
4. Sebastian Vettel (Ferrari)
5. Valtter Bottas (Mercedes)
6. Kimi Raikkonen (Ferrari)
7. Nico Hulkenberg (Renault)
8. Carlos Sainz (Renault)
9. Charles Leclerc (Sauber)
10. Marcus Ericsson (SAuber)
11. Esteban Ocon (Force India)
12. Fernando Alonso (McLaren)
13. Sergio Perez (Force India)
14. Brendon Hartley (Toro Rosso)
15. Pierre Gasly (Toro Rosso)*
16. Romain Grosjean (Haas)**
17. Stoffel Vandoorne (McLaren)
18. Kevin Magnussen (Haas)
19. Lance Stroll (Williams)
20. Sergey Sirotkin (Williams)
*Pierre Gasly will start at the back of the grid due to an engine penalty
**Romain Grosjean will drop back three places after picking up a grid penalty for causing a crash at the United States Grand Prix