Marco Wittmann grabbed pole position for the Macau Grand Prix with a stunning late effort in qualifying on Friday.
The German, who had been quickest in the morning practice session, was locked in a major battle with Robert Merhi throughout the 30-minute fight for grid positions.
Merhi appeared to have stolen the top spot in the closing stages, but Wittmann saved his best for last to steal pole position by just 0.064 seconds.
Antonio Felix da Costa bounced back from an accident in the morning's practice session to grab third place - but he will start on the front row because Merhi will be moved back seven places for having caused a crash in first qualifying.
Valtteri Bottas proved that his late arrival into Macau, following his Formula 1 test for Williams this week, had not affected him as he secured fourth overall on the timesheets and will start third.
Alexander Sims also recovered from a crash in the morning practice to deliver the fifth quickest time - ahead of Felipe Nasr, who had been fighting right at the front of the field for much of the session but crashed late on.
The session passed without a red flag, although Daniel Abt ran wide into the barriers at Police before being hit from behind by Richard Bradley.
Pos Driver Team/Car Time Gap 1. Marco Wittmann Signature Dallara-VW 2m12.790 2. Roberto Merhi Prema Dallara-Merc 2m12.854 + 0.064s 3. Antonio Felix da Costa Hitech Dallara-VW 2m13.115 + 0.325s 4. Valtteri Bottas Double R Dallara-Merc 2m13.192 + 0.402s 5. Alexander Sims TOM'S Dallara-Toyota 2m13.407 + 0.617s 6. Felipe Nasr Carlin Dallara-VW 2m13.429 + 0.639s 7. Kevin Magnussen Carlin Dallara-VW 2m13.518 + 0.728s 8. Felix Rosenqvist Mucke Dallara-Merc 2m13.528 + 0.738s 9. Carlos Huertas Carlin Dallara-VW 2m13.704 + 0.914s 10. Yuhi Sekiguchi Mucke Dallara-Merc 2m13.850 + 1.060s 11. Laurens Vanthoor Signature Dallara-VW 2m13.973 + 1.183s 12. Marko Asmer Double R Dallara-Merc 2m14.011 + 1.221s 13. Carlos Munoz Signature Dallara-VW 2m14.020 + 1.230s 14. Daniel Juncadella Prema Dallara-Merc 2m14.064 + 1.274s 15. Kimiya Sato Motopark Dallara-VW 2m14.246 + 1.456s 16. Pietro Fantin Hitech Dallara-VW 2m14.415 + 1.625s 17. Jazeman Jaafar Carlin Dallara-VW 2m14.477 + 1.687s 18. Carlos Sainz Jr Signature Dallara-VW 2m14.511 + 1.721s 19. Daniel Abt Signature Dallara-VW 2m14.513 + 1.723s 20. Hannes van Asseldonk Hitech Dallara-VW 2m14.591 + 1.801s 21. Richie Stanaway Van Amersfoort Dallara-VW 2m14.625 + 1.835s 22. William Buller Fortec Dallara-Merc 2m14.649 + 1.859s 23. Hideki Yamauchi Toda Dallara-Honda 2m14.863 + 2.073s 24. Hywel Lloyd Sino Vision Dallara-Merc 2m15.022 + 2.232s 25. Lucas Foresti Fortec Dallara-Merc 2m15.061 + 2.271s 26. Richard Bradley TOM'S Dallara-Toyota 2m15.855 + 3.065s 27. Adderly Fong Sino Vision Dallara-Merc 2m16.666 + 3.876s 28. Hironobu Yasuda Three Bond Dallara-Nissan 2m22.302 + 9.512s 29. Jimmy Eriksson Motopark Dallara-VW 2m55.360s + 42.570s 30. Mitch Evans Double R Dallara-Merc