Italian Francesco Bagnaia ended a barren run by outpacing championship leader Fabio Quartararo to win the Spanish MotoGP at Jerez on Sunday.
Spaniards Aleix Espargaro and Marc Marquez took the next two places as Spaniard Alex Rins, who started the race level on points atop the standings, failed to score.
Bagnaia won six times last season as he finished second to Quartararo in the championship, but this season has finished no better than fifth.
"This is one of the most grateful wins because it comes after a long wait," he said.
At the start, he shot away on his factory Ducati and stayed ahead the rest of the way.
"Finally this weekend everything went well. I am so happy. We are back at out full potential," he said.
He said he was still battling shoulder pain, but had managed it by limiting his time on track in practice and qualifying.
"It was important not to test too much my shoulder this weekend so I didn't ride many laps," he said.
Only Yamaha's Quartararo could keep pace, but after pressing in the early laps, spent the rest of the race hanging on before finishing just over a quarter of a second behind.
"He was too fast today," said Quartararo. "It was not a battle because we did not overtake, but it was intense and we enjoyed it."
"I knew if I didn't overtake Pecco (Bagnaia) in the first two or three laps my front tire would be super-hot. I didn't overtake and that was the problem."
"In the last few laps, I pushed myself to the limit but couldn't find my overtaking spot."
The battle, and the overtaking, were several seconds behind as Australian Jack Miller, on another Ducati, tried to hold off the ever-aggressive Marquez, with two more Spaniards, Espargaro, on an Aprilia, and Joan Mir, on a Suzuki, lurking.
They provided breathless entertainment for a crowd of more than 60,000, the first time spectators at the Andalusian circuit since 2019.
"Jerez is one of the most iconic tracks," said Espargaro. "To see the track full of people is amazing."
'This is my corner'
Marquez overtook, but as he tried to hold off Miller's counter-attack, lost control on a corner, only saving himself from another crash by elbowing down on the tarmac and regaining his balance, while the Australian misjudged his braking.
Espargaro pounced.
"It has been very difficult mentally," he said. "I was much quicker than Jack and Marc and I couldn't overtake them. So I wait for a mistake. Jack missed the brakes and Marc lost the front so I thought 'this is my corner.'"
He quickly pulled away to finish third, almost 11 seconds behind Bagnaia.
"I was very emotional on the podium because it came to my mind that when I was 11 or 12 I was in this place and here I am a rider at 31."
Quartararo pulled clear at the top of the standings, with Espargaro second.
"Very happy I'm just seven points from Fabio," said Espargaro.
Enea Bastianini, who was eighth on a Gresini-Ducati, moved into a tie with Rins, who was 19th, for third. Bagnaia climbed to fifth, 23 points behind Quartararo.
"I lost a lot of points at the start but the championship is very long," he said.
The next race is Quartararo's home grand prix at Le Mans on May 15.