Johann Zarco produced an emphatic late display in qualifying to seal his third pole of the season at Motegi.
The Frenchman, still chasing his first win this year, was the only rider to break the 1m58s barrier, while his final three laps would all have earned him pole.
As it was his fastest time, a 1m57.888s, left him almost a quarter of a second clear of the Aspar Aprilia of Hector Faubel, who demoted team-mate and championship leader Nicolas Terol to third in the final minutes.
Terol was the first of the frontrunners to show his hand, at one point moving 0.6s clear of the field before Zarco and Faubel's late charges left him with the final spot on the front row.
Fourth went to early pacesetter Maverick Vinales on the Blusens Aprilia, which was the last bike to get within 1s of Zarco.
Alberto Moncayo's Aprilia was almost half a second back but managed to hang on to fifth, as Efren Vazquez missed out by just 0.065s with his final flying effort.
Aprilia riders rounded out the top 10, with Sandro Cortese heading Jonas Folger, Adrian Martin and Alessandro Tonucci.
There were falls for Shun'ya Mori, on Simone Grotzki's Phonica Aprilia, and Luis Salom on the RW Racing GP. Salom fell early but did enough to secure 12th, while Mori will start from 32nd ahead of fellow Japanese riders Takehiro Yamamoto (Nobby Honda) and Jun Ohnishi (Project u Honda).
Pos Rider Team/Bike Time Gap 1. Johann Zarco Ajo Derbi 1m57.888s 2. Hector Faubel Aspar Aprilia 1m58.130s + 0.242s 3. Nicolas Terol Aspar Aprilia 1m58.248s + 0.360s 4. Maverick Vinales Blusens Aprilia 1m58.458s + 0.570s 5. Alberto Moncayo Andalucia Aprilia 1m58.937s + 1.049s 6. Efren Vazquez Ajo Derbi 1m59.002s + 1.114s 7. Sandro Cortese Germany Aprilia 1m59.178s + 1.290s 8. Jonas Folger Ajo Aprilia 1m59.210s + 1.322s 9. Adrian Martin Aspar Aprilia 1m59.418s + 1.530s 10. Alessandro Tonucci Italia FMI Aprilia 1m59.917s + 2.029s 11. Luigi Morciano Italia FMI Aprilia 1m59.977s + 2.089s 12. Luis Salom RW Aprilia 1m59.978s + 2.090s 13. Jakub Kornfeil Ongetta Aprilia 2m00.143s + 2.255s 14. Josep Rodriguez Blusens Aprilia 2m00.164s + 2.276s 15. Jasper Iwema Ongetta Aprilia 2m00.367s + 2.479s 16. Marcel Schrotter Mahindra 2m00.413s + 2.525s 17. Louis Rossi Matteoni Aprilia 2m00.510s + 2.622s 18. Danny Kent Ajo Aprilia 2m00.514s + 2.626s 19. Danny Webb Mahindra 2m00.781s + 2.893s 20. Giulian Pedone Phonica Aprilia 2m00.939s + 3.051s 21. Alexis Masbou Caretta KTM 2m01.003s + 3.115s 22. Niklas Ajo TT Motion Aprilia 2m01.149s + 3.261s 23. Zulfahmi Khairuddin Ajo Derbi 2m01.234s + 3.346s 24. Harry Stafford Ongetta Aprilia 2m01.286s + 3.398s 25. Hikari Ookubo Garage Honda 2m01.422s + 3.534s 26. Jack Miller Caretta KTM 2m01.442s + 3.554s 27. Brad Binder Civica Aprilia 2m01.682s + 3.794s 28. Taylor Mackenzie Phonica Aprilia 2m01.914s + 4.026s 29. Joan Perello Matteoni Aprilia 2m01.939s + 4.051s 30. Sturla Fagerhaug WTR-Ten10 Aprilia 2m02.141s + 4.253s 31. Hyuga Watanabe Project u Honda 2m02.234s + 4.346s 32. Shun'ya Mori Phonica Aprilia 2m02.247s + 4.359s 33. Takehiro Yamamoto Nobby Honda 2m04.112s + 6.234s 34. Jun Ohnishi Project u Honda 2m04.551s + 6.663s 35. Luca Fabrizio WTR-Ten10 Aprilia 2m05.631s + 7.743s