Italian rider Marco Bezzecchi won the Indonesian Grand Prix, while Jorge Martin finished third to reclaim the lead in the MotoGP world championship standings.
Bezzecchi, riding an Aprilia, passed pole-sitter Raul Fernandez in the final third of a thrilling race at the sweltering Mandalika International Circuit on Sunday. It was also the 300th victory by an Italian rider in MotoGP.
Spaniard Fernandez finished second, with fellow Spaniard Martin third, also on Aprilia machinery.
Seven-time reigning world champion Marc Marquez of Ducati could only finish sixth.
The result put Martin back on top of the standings, two points clear of Marquez, with five rounds remaining.
Martin leads on 355 points, with Marquez close behind on 353. Bezzecchi remains in title contention in third on 309.
"It's fantastic, I'm very, very happy," Bezzecchi said after his first win since May. "It was a beautiful race with Raul and I think I and the whole team deserve this result. They went through difficult times with me."
'I did my best'
Martin, who will head to Australia in two weeks with a slender lead, said he had done everything he could.
"I did my best," said Martin, who started alongside title rival Marquez on the second row. "I tried my hardest. I lost a lot of positions at the start but I stayed calm and passed the riders one by one. We're still in the fight and still leading."
Fernandez, who had to improvise his braking after breaking two fingers in Saturday's sprint, made a clean start from the first pole position of his career. He and Bezzecchi, who started alongside him, collided and both crashed in the sprint. Marquez won that sprint, taking the championship lead from fellow Spaniard Martin for the first time.
A third of the way through the 27-lap Grand Prix, Fernandez was still holding off Bezzecchi despite his injury. Former world champion Martin ran third, while Marquez sat fifth without mounting a real threat.
Fernandez, who has two previous wins, stayed calm under heavy pressure from Bezzecchi until lap 19, when the Italian moved ahead to take the lead. From there Bezzecchi pulled away to win by 4.26 seconds, while a stubborn Fernandez held on for second.