Marquez, who has sealed the 2019 crown with four races to spare, is now just two premier-class titles short of Giacomo Agostini and one short of Valentino Rossi.
The 26-year-old spent most of the Thailand Grand Prix in Quartararo’s wheeltracks before inflicting another last-lap defeat on the French rookie, whose wait for a maiden grand prix victory goes on.
Quartararo, who had been allowed extra RPM from his engine this weekend and qualified on pole for the fourth time, had maintained the lead off the line, while Marquez jumped Maverick Vinales immediately for second and saw off a challenge from the works Yamaha rider on the run down to Turn 3.
Marquez himself then slipstreamed past Quartararo on that straight on the second tour, only to get his braking wrong into Turn 3, running wide in the sweeping right-hander and only just keeping second place from Vinales.
The Honda man was back on Quartararo’s rear tyre in no time, and soon the pair began to make a break for it – with only Vinales managing to keep up for a couple of laps before dropping to more than three seconds off the lead by the end of the 10th lap.
By then Quartararo had managed to put some distance between himself and Marquez, with the gap reaching nearly seven tenths at one point, only for the championship leader to immediately start catching the rookie back up.
On lap 13, he was all over Quartararo once more, hounding him corner after corner as the race passed its halfway point.
He continued to put Quartararo under relentless pressure until lap 23, where he finally tried a move around the outside of Turn 3 but eventually conceded the corner to his rival.
Another look followed at the same corner the lap after, but this wasn’t enough to unsettle Quartararo heading into the penultimate lap, on which the Frenchamn yet again hit his marks and kept Marquez at bay.
But on the final lap Marquez overtook Quartararo using the slipstream even before the braking into Turn 3, and managed to get his Honda stopped just in time to exit the corner ahead.
Quartararo stayed with Marquez over the rest of the lap and launched it down the inside of the Honda man at the final corner, desperately trying to get his bike stopped and pull off a block pass, but running out just wide to allow Marquez a crucial cut-back move.
The pair were separated by 0.171s at the chequered flag, with Vinales completing the podium another second down.
Dovizioso finished fourth, some 11 seconds down on Marquez as he fought off the charging Suzuki of Alex Rins.
Quartararo’s Petronas Yamaha teammate made it three Yamahas in the top six, while Suzuki’s Joan Mir defeated Yamaha’s Valentino Rossi in a close scrap for eighth place.
Danilo Petrucci settled for ninth in the second works Ducati, while Takaaki Nakagami completed the top 10 on the year-old LCR Honda.
Pramac Ducati rider Jack Miller was forced to surrender his sixth place on the grid and pull into the pitlane after at the start of the warm-up lap, but recovered to 14th after starting from the pitlane.
Marquez’s Repsol Honda teammate Jorge Lorenzo was a bruising 18th as he was successful at fighting off Karel Abraham (Avintia Ducati) and Hafizh Syahrin (Tech 3 KTM) but finished 54 seconds down on the race winner.
KTM’s Johann Zarco replacement Mika Kallio was the only rider to crash out, hitting the deck at Turn 8 on the fourth lap while running 16th.
Aprilia’s Aleix Espargaro was the only other retirement, the Spaniard seeming disconsolate as he pulled into the pitlane with an unspecified issue.