MotoGP world champion Valentino Rossi powered from fourth on the starting grid to take his first victory of the season in Spain on Sunday and open an 11-point lead at the top of the overall standings.
The Yamaha rider slipped past early leader Dani Pedrosa with 10 laps left in front of the 120,000 crowd at the Jerez circuit and pulled away to finish the 27-lap race 2.7 seconds clear of the Spaniard's Honda.
Australian Casey Stoner was third for Ducati, the 2007 champion's first appearance on the podium at Jerez.
Victory for Rossi, his first since Malaysia last October and his 72nd in the top category, handed the Italian the lead in the championship standings with 65 points after three rounds.
Stoner, winner of last month's rain-delayed season-opener in Qatar, is second on 54 and Pedrosa tied for third with compatriot and Rossi's team mate Jorge Lorenzo on 41.
Lorenzo, who led the standings after his victory in Japan, slid off the track into the gravel with three laps left while attempting to haul in Stoner and was forced to abandon the race.
Rossi experienced some problems in qualifying on Saturday but was quickest in Sunday's warm-up in calm and sunny conditions and said the Yamaha technicians had managed to fix the setup in time for the race.
"We had to make a big change and without it I certainly wouldn't have won," the six-times premier class world champion said in a television interview.
"I am so fast with the sliding tyre and was able to catch Dani and overtake and have another nine or 10 laps to the end," he added. "I tried to stay concentrated, I know I have a great pace and it's possible to win."
Pedrosa, whose preparations for the season were hit by surgery on his left knee and arm in March after a crash in testing, said Rossi had looked fast already in Friday's practice.
"I just tried make my race and see what the result was at the end because coming from all the problems we had it is still unbelievable for me to be on the podium," he said in a separate television interview.
"I'm very happy and also surprised."
Stoner said he had thought his podium was a step too far until the chasing Lorenzo crashed. "To me, this feels like a bigger victory than in Qatar," he added.
In the 250cc category, Japan's Hiroshi Aoyama won for Honda ahead of Spanish Aprilia rider Alvaro Bautista and Italian Marco Simoncelli of Gilera.
Britain's Bradley Smith took his first 125cc grand prix win at the 50th attempt. Smith's Aprilia team mate Sergio Gadea came in second and Marc Marquez of KTM third.
The riders next compete in the French Grand Prix at Le Mans in two weeks' time.