Dovizioso couldn't begin the session along with other riders as his front brake was reportedly jammed, and the Italian had to wait for 10 of the warm-up's 20 minutes to get onto the track.
By that time Marquez was leading comfortably with a 1m39.965s, having demoted surprise early leader Aleix Espargaro.
Espargaro was still second behind Marquez and the duo kept their places until the chequered flag fell, even with the Aprilia rider having crashed at Turn 9.
But then Quartararo set a late flyer of 1m39.918s, overhauling Marquez by less than half a tenth.
Yamaha's Maverick Vinales, who got a three-place grid penalty for riding in an irresponsible manner in qualifying, was a close fourth behind Espargaro, with Alex Rins completing the top five for Suzuki.
LCR Honda's Takaaki Nakagami and Yamaha's Valentino Rossi were the last two riders within half a second of the top time, followed by factory Ducatis of Danilo Petrucci and Dovizioso.
The latter was in the lower ranks of the order for most of the session after he started running, and in the end only recorded six laps.
Cal Crutchlow (LCR Honda) completed the top 10, beating the works Honda of Jorge Lorenzo by 0.003s.
Pol Espargaro crashed, seconds before his brother did, at Turn 5 but still ended up as the top KTM in 16th, while another KTM rider Hafizh Syahrin also had an early fall at Turn 2.
|1|| Fabio Quartararo ||Yamaha||12||1'39.918|
|2|| Marc Marquez ||Honda||12||1'39.965||0.047|
|3|| Aleix Espargaro ||Aprilia||7||1'40.173||0.255|
|4|| Maverick Viñales ||Yamaha||12||1'40.188||0.270|
|5|| Alex Rins ||Suzuki||11||1'40.298||0.380|
|6|| Takaaki Nakagami ||Honda||10||1'40.323||0.405|
|7|| Valentino Rossi ||Yamaha||12||1'40.417||0.499|
|8|| Danilo Petrucci ||Ducati||12||1'40.532||0.614|
|9|| Andrea Dovizioso ||Ducati||6||1'40.560||0.642|
|10|| Cal Crutchlow ||Honda||11||1'40.705||0.787|
|11|| Jorge Lorenzo ||Honda||12||1'40.708||0.790|
|12|| Joan Mir ||Suzuki||12||1'40.733||0.815|
|13|| Tito Rabat ||Ducati||12||1'40.734||0.816|
|14|| Francesco Bagnaia ||Ducati||11||1'40.748||0.830|
|15|| Jack Miller ||Ducati||12||1'40.789||0.871|
|16|| Pol Espargaro ||KTM||7||1'40.821||0.903|
|17|| Johann Zarco ||KTM||12||1'40.976||1.058|
|18|| Andrea Iannone ||Aprilia||10||1'41.076||1.158|
|19|| Karel Abraham ||Ducati||12||1'41.104||1.186|
|20|| Franco Morbidelli ||Yamaha||11||1'41.123||1.205|
|21|| Miguel Oliveira ||KTM||12||1'41.212||1.294|
|22|| Bradley Smith ||Aprilia||11||1'41.345||1.427|
|23|| Sylvain Guintoli ||Suzuki||10||1'42.217||2.299|
|24|| Hafizh Syahrin ||KTM||6||1'44.444||4.526|
|View full results|