Johann Zarco put in a 1:53.4 to beat Danilo Petrucci to pole position at a drying Twin Ring Motegi while Marc Marquez's late slick tyre gamble almost cost him a front row slot.
Having set the fastest lap time of the weekend on a drying track at the end of FP4, Marquez went into qualifying as the one to beat.
He laid down a 1:53.903 to take P1 by 1.661s ahead of Petrucci. Zarco was third, a further two-tenths down.
Heading out for a second run, Zarco challenged Marquez for pole with his 1:53.469 edging the Honda rider's best by 0.434s.
With Marquez opting for slick tyres for his second run, the championship leader didn't have the pace to fight back and lost a further position to Petrucci. He did, however, hang onto a front row starting position.
Aleix Espargaro was fourth ahead of Dani Pedrosa and Jorge Lorenzo while KTM's Bradley Smith and Pol Espargaro, both of whom came through Q1, were seventh and eighth.
Andrea Dovizioso, second in the championship, was ninth with Alex Rins completing the top ten ahead of Andrea Iannone and Valentino Rossi, who only ran the slicks.
Maverick Vinales' title hopes were dealt a blow as he qualified down in 14th place, unable to find pace on a drying track. The Yamaha rider, third in the championship, trails Marquez by 28 points.
1 Johann ZARCO FRA Monster Yamaha Tech 3 1'53.469
2 Danilo PETRUCCI ITA OCTO Pramac Racing 1'53.787 0.318 / 0.318
3 Marc MARQUEZ SPA Repsol Honda Team 1'53.903 0.434 / 0.116
4 Aleix ESPARGARO SPA Aprilia Racing Team Gresini 1'53.947 0.478 / 0.044
5 Jorge LORENZO SPA Ducati Team 1'54.235 0.766 / 0.288
6 Dani PEDROSA SPA Repsol Honda Team 1'54.342 0.873 / 0.107
7 Bradley SMITH GBR Red Bull KTM Factory Racing 1'54.872 1.403 / 0.530
8 Pol ESPARGARO SPA Red Bull KTM Factory Racing 1'54.906 1.437 / 0.034
9 Andrea DOVIZIOSO ITA Ducati Team 1'55.064 1.595 / 0.158
10 Alex RINS SPA Team SUZUKI ECSTAR 1'55.483 2.014 / 0.419
11 Andrea IANNONE ITA Team SUZUKI ECSTAR 1'55.617 2.148 / 0.134
12 Valentino ROSSI ITA Movistar Yamaha MotoGP 1'57.786 4.317 / 2.169
13 Loris BAZ FRA Reale Avintia Racing 1'55.862
14 Maverick VIÑALES SPA Movistar Yamaha MotoGP 1'55.916
15 Cal CRUTCHLOW GBR LCR Honda 1'55.952
16 Alvaro BAUTISTA SPA Pull&Bear Aspar Team 1'56.292
17 Hector BARBERA SPA Reale Avintia Racing 1'56.668
18 Sam LOWES GBR Aprilia Racing Team Gresini 1'56.771
19 Tito RABAT SPA EG 0,0 Marc VDS 1'56.903
20 Karel ABRAHAM CZE Pull&Bear Aspar Team 1'57.144
21 Hiroshi AOYAMA JPN EG 0,0 Marc VDS 1'57.157
22 Scott REDDING GBR OCTO Pramac Racing 1'57.787
23 Katsuyuki NAKASUGA JPN Yamalube Yamaha Factory Racing 1'57.861
24 Kohta NOZANE JPN Monster Yamaha Tech 3 2'01.730