(CNN) -- World champion Casey Stoner won the Valencia MotoGP, the final race of the season, after a thrilling battle with American Ben Spies all the way to the line.





Stoner led for most of the 30-lap race before Spies overtook him with three laps remaining. However, the Australian regained the lead to win by just one hundredth of a second and secure his 10th victory of a dominant season.





Spies, who won his first ever MotoGP at Assen in June, had to settle for second place with Italian Andrea Dovizioso third.





Briton Cal Crutchlow, Spain's Dani Pedrosa and Katsuyuki Nakasuga of Japan completed the top six.





Spies told reporters: "We tried to just be careful on the last lap as it had started to rain quite heavily.





"Casey took a couple more risks in the last couple of corners and had a bit more motor than me down the straight," he added.





Stoner, who had already sealed his second world championship triumph prior to Sunday's race, said: "It was the last lap of the last race of the year so I thought, 'Let's just go for it' -- and I got it. It was one of the hairiest races of my career."





The win ensured the Honda rider finished on 350 points, 90 points ahead of 2010 world champion Jorge Lorenzo, who was forced to miss the final race because of a finger injury.





Dovizioso's third place ensured he claimed third in the overall standings with 228 points, ahead of Pedrosa on 219 points and Spies on 176.





The race was the first since the tragic death of Marco Simoncelli in a crash in Malaysia a fortnight ago and, prior to racing, riders from the MotoGP, Moto2 and 125cc categories united to perform a lap of honor to remember the late Italian.
what sport is this article talking about Where is Casey Stoner from? Who is the world champion who edged out Ben Spies Where is Ben Spies from? Who claims a victory> What claims Casey Stoner? Who was third?
MotoGP, Australian Casey Stoner Casey Stoner American Casey Stoner It was one of the hairiest races of my career." Andrea Dovizioso
question: what sport is this article talking about, answer: MotoGP, | question: Where is Casey Stoner from?, answer: Australian | question: Who is the world champion, answer: Casey Stoner | question: who edged out Ben Spies, answer: Casey Stoner | question: Where is Ben Spies from?, answer: American | question: Who claims a victory>, answer: Casey Stoner | question: What claims Casey Stoner?, answer: It was one of the hairiest races of my career." | question: Who was third?, answer: Andrea Dovizioso