KTM’s Pol Espargaro took a shock lead with seven minutes to go, but Quartararo reclaimed the lead soon afterwards, and improved two more times before the session came to an end.
He eventually ended up with a 1m32.483s, leading Marquez by 0.142s, both riders setting their best times after the chequered flag fell.
Espargaro took an impressive third for KTM, followed by LCR Honda’s Cal Crutchlow and Maverick Vinales, whose session ended early with a fast crash at Turn 3.
Andrea Dovizioso was the top Ducati in sixth, more than half a second off the pace, with Morbidelli ending up seventh.
French Grand Prix front-row starters Jack Miller and Danilo Petrucci were eighth and ninth respectively, with Valentino Rossi completing the top 10.
Jorge Lorenzo and Alex Rins were a lowly 14th and 15th respectively, the latter’s teammate Joan Mir crashing twice in 20 minutes.
Avintia Ducati’s Tito Rabat was another rider to fall, and the Spaniard ended the session dead last.