Nico Rosberg will lead the field away at the start of Sunday's Hungarian GP at the Hungaroring.

His fourth pole of the season came after a dramatic set of qualifying sessions, thanks due to earlier rain showers that had an impact on all three rounds.

Rosberg's pole lap was a 1:19.965, which was just 0.143 seconds faster than that of his Mercedes teammate Lewis Hamilton, who was not able to set a faster time at the end of the session as he had to slow down for a spin by McLaren's Fernando Alonso. Rosberg also approached the incident as the yellow flags were flying, but replays show that he did lift, then the yellows soon cleared. The stewards are investigating the lap.

More from FoxSports

Behind them, Red Bull Racing gave the Silver Arrows a run for its money by locking out the second row. McLaren locked out the fourth row, marking the first time both cars had made it through to Q3 since their return to Honda power.

Although he hit misfortune in Q3, Hamilton was lucky just to make it through the second qualifying session as the field switched to slick tires right before the checkered flag flew at the end of Q2. This essentially meant that the last man standing would be fastest, and Hamilton didn't help his chances when he made a mistake on his lap. However, he just scraped through as 10th fastest.

Ferrari's Kimi Raikkonen wasn't as lucky. Despite being fastest when the checkered flew, drivers are still able to set their fastest times if they're on a lap, which means Raikkonen was pushed back to 14th.

However, as far as action goes, the opening Q1 was a qualifying session of its own, featuring four red flags for dreary conditions and incidents for Marcus Ericsson, Felipe Massa and Rio Haryanto. All drivers were OK.

Unofficial qualifying results:

1. Nico Rosberg - Mercedes
2. Lewis Hamilton - Mercedes
3. Daniel Ricciardo - Red Bull
4. Max Verstappen - Red Bull
5. Sebastian Vettel - Ferrari
6. Carlos Sainz - Toro Rosso
7. Fernando Alonso - McLaren
8. Jenson Button - McLaren
9. Nico Hulkenberg - Force India
10. Valtteri Bottas - Williams
11. Romain Grosjean - Haas
12. Daniil Kvyat - Toro Rosso
13. Sergio Perez - Force India
14. Kimi Raikkonen - Ferrari
15. Esteban Gutierrez - Haas
16. Felipe Nasr - Sauber
17. Jolyon Palmer - Renault
18. Felipe Massa - Williams
19. Kevin Magnussen - Renault
20. Marcus Ericsson - Sauber
21. Pascal Wehrlein - Manor
22. Rio Haryanto - Manor