Aleix Espargaro claimed victory ahead of Aprilia teammate Maverick Vinales at the Catalunya Grand Prix as championship leader Francesco Bagnaia was taken to hospital after crashing on the opening lap.
Sprint-winner Espargaro was second for much of Sunday's race, but the Spaniard took advantage of Vinales' worn front tyre to surge into the lead with four laps left.
It was a sweet victory for Espargaro at the Circuit de Barcelona-Catalunya, seven kilometres from his home town of Granollers.
Espargaro dedicated his victory to world champion Bagnaia, whose leg was run over by KTM's Brad Binder straight after the crash. Bagnaia was conscious and taken to hospital for treatment.
"First thing I want to say is they told me what happened to Pecco (Bagnaia) is nothing serious, that's lucky. This win is for him," Espargaro said.
Bagnaia's Ducati team were able to confirm later that, following initial scans, he had not suffered any fractures.
"Bagnaia has sustained multiple contusions, but further medical checks have shown no fractures. The reigning world champion will fly to Italy with the team tonight," Ducati said.
However, his Ducati teammate Enea Bastianini will have surgery on his ankle and hand from the same incident.
The race was red-flagged after Bastianini slipped on turn one and took out Marco Bezzechi, Johann Zarco, Fabio Di Giannantonio and Alex Marquez, before Bagnaia was launched into the air by a highside on the next turn.
Bagnaia's crash left him stranded in the middle of the track and KTM's Brad Binder was unable to swerve out of the way as he ran over the world champion's leg.
Aprilia had looked on course for a clean sweep, but Pramac Racing riders Jorge Martin and Johann Zarco leapfrogged Miguel Oliveira (RNF Aprilia) to finish third and fourth.
Australian Jack Miller finished eighth for KTM, 10.880sec behind the winner, after his 16th place in Saturday's sprint. Miller is also eighth in the overall standings.
After the chaotic start, the race was restarted for a new race distance of 23 laps. Martin rocketed off the line to take the lead heading into turn one, but he was quickly overtaken by Vinales and Espargaro.
World champion Bagnaia leads Martin by 50 points in the championship standings ahead of the San Marino Grand Prix at the Misano circuit.