Honda's Marquez stamped his authority on the session from the outset, as the first rider out of the pits and the first to record a time.
His 1m47.117s was seven tenths faster than he managed in practice earlier on Saturday, and was 1.542 seconds faster than his closest challenger after the first flying laps, Suzuki's Maverick Vinales.
By the time riders finished their first runs, that gap had been halved.
But such was Marquez's initial lap, 0.726s still separated Marquez and LCR Honda's Cal Crutchlow, while Yamaha pair Jorge Lorenzo and Valentino Rossi were 0.817s and 0.993s adrift in third and fourth.
While Marquez did not improve on his second run, he did not need to, and he claimed pole by 0.631s, a margin that then covered second to 11th on the grid.
Vinales won the fight to be second with a 1m47.748s lap set with one minute left on the clock, while Lorenzo then improved after the chequered flag to snatch the final spot on the front row of the grid.
Having been relatively quiet all weekend, Andrea Dovizioso wound up fifth for Ducati, ahead of Crutchlow, Rossi and Dani Pedrosa on the other factory Honda.
Crutchlow and Pedrosa both crashed in the closing stages, at Turn 1 and at Turn 15 respectively.
Danilo Petrucci advanced from the first phase of qualifying and finished ninth, one spot ahead of Pramac Ducati team-mate Scott Redding.
Aprilia had a rider in Q2 for the second time in as many grands prix, with Stefan Bradl making the session for the first time since the 2014 season finale, and ultimately qualifying 12th.
The second factory Ducati for the weekend, Michele Pirro crashed at Turn 8 at the end of the first phase of qualifying, and will start 17th.
Marc VDS Honda stand-in Nicky Hayden will line up his first GP since the 2015 season finale in 19th place, one spot behind team-mate Tito Rabat.
Alex Lowes sat out qualifying after a crash on Saturday morning, and his participation in the race is set to be determined by medical checks on Sunday.