Marc Marquez passed Danilo Petrucci on the final lap to win the rainy San Marino and Rimini Riviera Grand Prix and draw level with Andrea Dovizioso a the top of the MotoGP standings.

Petrucci had taken the lead a quarter of the way through the race when Jorge Lorenzo crashed spectacularly - but apparently without injury.

Petrucci finished second and Dovizioso was third.

Lorenzo had a strong start, moving up immediately from fifth to first.

There were multiple falls and six riders retired.

Marquez and Dovizioso each have 199 points, 26 ahead of Maverick Vinales in third with five races remaining.

It was Marquez's fourth win of the season.

Dominique Aegerter won the Moto2 race and Romano Fenati took the Moto3 event.