Marquez led almost the entire session, but a late flyer from Dovizioso on soft tyres relegated him to second place, with the reigning champion electing to stick with the medium compound instead.
The Honda rider had set the initial pace on the opening run of the session, ending up on a 1m24.338s that left him five tenths clear of nearest rival Jack Miller.
Marquez recorded this laptime while following Maverick Vinales, and ultimately overtook the Yamaha rider, only to then run through the gravel after getting his braking wrong at the Turn 4 right-hander.
Late into his second run, Marquez improved to a 1m24.218s, retaining a big advantage over the chasing pack until the final minutes, when Dovizioso lapped within half a tenth of his benchmark.
As the chequered flag flew, Dovizioso fired in a 1m24.033s to snatch honours from Marquez.
Vinales ended up third, a quarter of a second down on Dovizioso, while Pramac Ducati rider Miller – who is currently at the centre of an emerging 2020 rider market saga that also involves the injured Jorge Lorenzo – snatched fourth place in the end.
Alex Rins, the sole Suzuki rider this weekend with Joan Mir absent, took seventh, while Johann Zarco led KTM’s efforts in eighth place at its home track, as LCR Honda’s Takaaki Nakagami and Tech 3 KTM’s Miguel Oliveira completed the top 10.
Oliveira’s teammate Hafizh Syahrin was the only rider to crash during the session, suffering a near-highside at the penultimate corner and taking a hit to the abdomen. He received assistance on-site and was taken to the medical centre for a check-up.
Aleix Espargaro was the top Aprilia rider in 12th, edging the likes of works Ducati rider Danilo Petrucci in 14th and Lorenzo’s Honda stand-in Stefan Bradl in 19th.