Nine-time world champion Valentino Rossi led from the start to secure victory in the Spanish MotoGP at the Circuito de Jerez.
The 37-year-old outpaced his Yahama Movistar team-mate Jorge Lorenzo to claim his first victory of the season.
The Italian now trails championship leader Marc Marquez by 24 points after four races of the 18-race series.
Spain’s Marquez finished third on the Honda, while Northern Ireland’s Eugene Laverty came in a creditable ninth.
Cal Crutchlow took 11th place on the LCR Honda ahead of fellow Briton Bradley Smith on his Monster Tech 3 Yamaha.
It is the first time since 2009 that the race has not been won by a Spanish rider.
Rossi, who qualified in pole, seemed momentarily to have been passed by defending champion Lorenzo on lap two, but managed to regain the lead in the same manoeuvre.
“I think this was the perfect weekend because we started to go faster from Friday morning,” Rossi told BT Sport 2.
“We worked very well with the team. I had a good start, we had good pace and I felt good with the bike from the beginning.”
Marquez, who won back-to-back victories in Argentina and the United States in the previous two races, leads the standings with 82 points, with Lorenzo second on 65 points and Rossi a further eight points behind in third.
The next race takes place at Le Mans in France on 8 May.
1. Valentino Rossi (Italy) Yahama 45m 28.834s
2 Jorge Lorenzo (Spain) Yamaha +2.386
3. Marc Marquez (Spain) Honda +7.087
4. Dani Pedrosa (Spain) Honda +10.351
5. Aleix Espargaro (Spain) Suzuki +14.143
6. Maverick Viñales (Spain) Suzuki +16.772
7. Andrea Iannone (Italy) Ducati +26.277
8, Pol Espargaro (Spain) Yamaha +30.750
9. Eugene Laverty (Northern Ireland) Ducati +32.325
10. Hector Barbera (Spain) Ducati +32.624