Ferrari's Sebastian Vettel will start in pole position at the Hungarian Grand Prix after recording the fastest qualifying time.
The German came in narrowly ahead of his teammate Kimi Raikkonen, with Mercedes duo Valtteri Bottas and Lewis Hamilton in third and fourth respectively.
Great Britain's Hamilton was shooting for a record-equalling 68th pole position, but was pegged back when he ran wide at Turn 4 during Q3, forcing him to abort the lap.
Meanwhile, Hamilton's fellow Briton Paul di Resta stepped in for Williams after Felipe Massa was ruled out of qualifying through illness, securing a 19th-place finish.
Elsewhere, Daniel Ricciardo of Red Bull recovered from gearbox issues to finish sixth, one position behind teammate Max Verstappen.
Nico Hulkenberg, Fernando Alonso, Stoffel Vandoorne and Carlos Sainz rounded off the top 10.
Qualifying standings in full:
1. Sebastian Vettel (Ferrari)
2. Kimi Raikkonen (Ferrari)
3. Valtteri Bottas (Mercedes)
4. Lewis Hamilton (Mercedes)
5. Max Verstappen (Red Bull)
6. Daniel Ricciardo (Red Bull)
7. Nico Hulkenberg (Renault)
8. Fernando Alonso (McLaren)
9. Stoffel Vandoorne (McLaren)
10. Carlos Sainz (Toro Rosso)
11. Jolyon Palmer (Renault)
12. Esteban Ocon (Force India)
13. Daniil Kvyat (Toro Rosso)
14. Sergio Perez (Force India)
15. Romain Grosjean (Haas)
16. Kevin Magnussen (Haas)
17. Lance Stroll (Williams)
18. Pascal Wehrlein (Sauber)
19. Paul di Resta (Williams)
20. Marcus Ericsson (Sauber)