Lewis Hamilton will start in pole position for tomorrow's Belgian Grand Prix.
The Mercedes driver ended a dramatic Q3 with a 2:01.012 to finish just ahead of the two Red Bull drivers and earn his fourth pole in a row.
It looked as if Paul Di Resta's 2:02.332 was going to be enough for pole, with five minutes remaining in worsening conditions.
Mark Webber then went quicker, before being beaten by his teammate Sebastian Vettel, only for Hamilton to steal pole with moments left.
Hamilton's Mercedes teammate Nico Rosberg was also able to go quicker than Di Resta right at the end to secure a place on the second row of the grid.
Grid for Belgian Grand Prix:
1. Lewis Hamilton (Mercedes)
2. Sebastian Vettel (Red Bull)
3. Mark Webber (Red Bull)
4. Nico Rosberg (Mercedes)
5. Paul Di Resta (Force India)
6. Jenson Button (McLaren)
7. Romain Grosjean (Lotus)
8. Kimi Raikkonen (Lotus)
9. Fernando Alonso (Ferrari)
10. Felipe Massa (Ferrari)
11. Niko Hulkenberg (Sauber)
12. Adrian Sutil (Force India)
13. Sergio Perez (McLaren)
14. Giedo van der Garde (Caterham)
15. Jules Bianchi (Marussia)
16. Max Chilton (Marussia)
17. Pastor Maldonado (Williams)
18. Jean-Eric Vergne (Toro Rosso)
19. Daniel Ricciardo (Toro Rosso)
20. Valteri Bottas (Williams)
21. Estebadn Gutierrez (Sauber)
22. Charles Pic (Caterham)