Marquez’s masterclass in damp conditions at the Misano circuit gave him his second victory in as many races, after he won the Aragon Grand Prix last weekend.

He denied the Italian Ducati Factory team a win on home turf as Enea Bastianini finished third.

Australia’s Jack Miller, who started in 12th on the Red Bull KTM, finished eighth and is in 15th place overall.

Martin eventually finished 15th after swapping bikes twice. His championship lead over Bagnaia has been cut to seven points while Marquez is now 53 points behind the Pramac Racing rider.

“For me, the most important thing was the speed after that rain, it gave me the possibility to lead the race. Then when I was leading, I said, ‘Now I will try to find the same pace as the practice’,” Marquez said.

He dedicated the victory to the Gresini Racing team’s late founder, Fausto Gresini.

With rain looming, Martin had another good start - just as he did to win Saturday’s sprint - but this time Bagnaia was able to stay ahead and retain the lead.

The pair nearly collided on the second lap, but Martin braked hard to avoid contact, while his teammate Franco Morbidelli damaged Pedro Acosta’s wing when he overtook the GasGas Tech3 bike, but the rookie managed to keep his balance.

But without a wing on one side, Acosta found it difficult to muscle his bike around the circuit and he eventually slid off at turn 14 a couple of laps later before rejoining the race, dropping from fourth to last place.

The rain soon came down with 21 laps to go, however, and Morbidelli was the first to crash when he slid off the damp surface at turn one.

Martin rolled the dice and led a bunch of riders into the pits to swap bikes, but the rain suddenly cleared and Marquez and Bagnaia opted to stay out on track.

Soon after, Marquez came into his own and carved his way through the pack to take the lead from Bagnaia, who was gingerly navigating his way through the wet parts of the circuit.

But because the rain stopped, Martin was forced to swap bikes again for slick tyres. The crestfallen Spaniard was shaking his head as he rejoined the race behind Marquez and Bagnaia a full lap down.

With Bagnaia’s immediate rival out of the picture, the Italian chose not to take risks, following Marquez cautiously while Bastianini moved up to third on his familiar home circuit.

Francesco Bagnaia in pursuit of Marc Marquez. (Photo: AAP)

Out front, Marquez steadily increased the gap between himself and Bagnaia as the Spaniard took the chequered flag, sparking celebrations in the Gresini Racing garage.

“Today, more than second was impossible,” said Bagnaia, still feeling the effects of a crash at the Aragon Grand Prix.

“Marc was too in shape to try and attempt … to win. Maybe next time I will be fully fit, and I can have a chance.

“But Marc in these conditions is for sure very strong, so we will try again next time.”

AAP