Romain Grosjean set the pace in the final practice session for the Hungarian Grand Prix.
The Lotus driver surged to the top of the times six minutes from the end of the session, his best of 1m20.730s coming during a flurry of quick times set on the soft tyre inside the final 10 minutes.
Fernando Alonso was second for Ferrari, ahead of McLaren's Sergio Perez, who ended up in the barriers with just minutes remaining after spinning at speed on the approach to Turn 11.
Having set the pace during the first two practice sessions, Sebastian Vettel was just fourth fastest in free practice three.
The Red Bull driver spent the majority of the session working on a long run on the medium tyre, and was sitting 19th before improving with a soft tyre run right at the end.
Felipe Massa was fifth, slotting in ahead of Lewis Hamilton, Mark Webber, Nico Rosberg, Jenson Button and Adrian Sutil.
Kimi Raikkonen missed out on a top 10 spot, finishing 11th after complaining about a lack of rear grip.
Grosjean's pace was not limited to the soft tyre. Earlier in the session, he was one of the pacesetters on the medium tyre, going fastest 18 minutes into the session.
But in the end it was Hamilton who led the way on the medium tyre.
He first jumped to the top 26 minutes into the session with a 1m22.266s, before lowering his best time to a 1m21.942s, the fastest that was set on the harder of the two compounds.
Pos Driver Team Time Gap Laps
1. Romain Grosjean Lotus-Renault 1m20.730s 20
2. Fernando Alonso Ferrari 1m20.898s +0.168s 13
3. Sergio Perez McLaren-Mercedes 1m21.052s +0.322s 10
4. Sebastian Vettel Red Bull-Renault 1m21.125s +0.395s 27
5. Felipe Massa Ferrari 1m21.151s +0.421s 14
6. Lewis Hamilton Mercedes 1m21.158s +0.428s 19
7. Mark Webber Red Bull-Renault 1m21.254s +0.524s 17
8. Nico Rosberg Mercedes 1m21.356s +0.626s 23
9. Jenson Button McLaren-Mercedes 1m21.499s +0.769s 15
10. Adrian Sutil Force India-Mercedes 1m21.519s +0.789s 20
11. Kimi Raikkonen Lotus-Renault 1m21.589s +0.859s 17
12. Pastor Maldonado Williams-Renault 1m21.646s +0.916s 19
13. Paul di Resta Force India-Mercedes 1m21.963s +1.233s 21
14. Nico Hulkenberg Sauber-Ferrari 1m21.964s +1.234s 21
15. Daniel Ricciardo Toro Rosso-Ferrari 1m22.180s +1.450s 18
16. Jean-Eric Vergne Toro Rosso-Ferrari 1m22.423s +1.693s 19
17. Valtteri Bottas Williams-Renault 1m23.028s +2.298s 16
18. Giedo van der Garde Caterham-Renault 1m23.975s +3.245s 21
19. Charles Pic Caterham-Renault 1m23.987s +3.257s 19
20. Jules Bianchi Marussia-Cosworth 1m24.298s +3.568s 20
21. Max Chilton Marussia-Cosworth 1m25.122s +4.392s 20
22. Esteban Gutierrez Sauber-Ferrari no time set 2