(CNN) -- Defending world champion Casey Stoner has won a thrilling Spanish MotoGP, holding off Spain's Jorge Lorenzo to claim his first victory in the race.
Starting from fifth on the grid, the Australian quickly made his way up the field producing a wonderful maneuver to go past Lorenzo and Pedrosa on lap two of the 27-lap race.
But he couldn't shake Lorenzo off who closed the gap in the last 10 laps, but the Spaniard couldn't find a way past leaving a delighted Stoner to take the checkered flag.
"That is the greatest race I've ever done. I had a poor start and the conditions were dodgy at first but the bike was working fantastic," said the Honda rider, who has now extended his run of podium finishes to 17.
Lorenzo, world champion two season's ago, was disappointed not to pull off a victory in front of his home fans but conceded that Stoner has ridden "a remarkable race."
His compatriot Dani Pedrosa came home third on a Honda pipping England's Cal Crutchlow who had to settle for fourth, who was just 2.4 seconds behind Stoner.
Lorenzo, who failed in his bid to become the first rider since Valentino Rossi to win the first two races of the season, still leads the MotoGP standings with 45 points, but Stoner now trails him by just four points.
Pedrosa is third on 36 points while Crutchlow has 26 points.