Lorenzo's delight at winning end to season
World champion Jorge Lorenzo finished the season in fine fashion with victory at the Valencia MotoGP.
Lorenzo passed pole-sitter Casey Stoner on lap 22 after almost coming off when he made contact with Marco Simoncelli's Honda and held off Stoner for the win.
Valentino Rossi took a comfortable third in his last race for Fiat Yamaha.
Dani Pedrosa came home seventh after a good start, but had the consolation of finishing second in the championship, 138 points adrift of Lorenzo.
Pedrosa made a superb start but ran out of steam and once the front three were clear, became embroiled in a fierce battle for the minor placings with Simoncelli - who had started off the front of the grid for the first time in his MotoGp career - and Andrea Dovizioso.
But the intensity of their in-fighting allowed rookie of the year Ben Spies to show the form that has earned him the chance to replace Rossi next season and pass them all to claim fourth place.
Lorenzo ended the season with a record 383 points, 10 more than the previous best for a season, set by seven-time world champion Rossi.
It was also his ninth victory of a season he utterly dominated, and where his worst finish was fourth, at Japan and Malaysia.
"I can't ask for anything more," he said afterwards.
"It was one of the best races of my life - I had some difficulties when Simoncelli was stopping on a corner, but I kept calm and at the end I made a beautiful fight with Casey [Stoner]."
It was a landmark race too for Rossi as he bade farewell to the Yamaha team after seven years.
Rossi says goodbye to Yamaha at Valencia
"It was a great experience," the Italian stated. "We enjoyed a lot with Yamaha so I'm happy to do a good race to finish the experience together.
"I enjoyed it a lot but unfortunately at the end I don't have any more power to stop the bike - third place is ok, it's another podium. I had fun."
In the 125cc race, Great Britain's Bradley Smith bade farewell to the class before his move up to Moto2 next season with his first victory of the season.
Spain's Marc Marquez finished fourth in the race, enough to secure him the world title, and a clean-sweep of titles in all three categories for Spain.
The Moto2 title had already been won by Toni Elias, who failed to finish the race after crashing out from third position on the final lap.
The race was won by Czech rider Karel Abraham, who is moving up to MotoGP next season. with Andrea Iannone second and Julian Simon in third, a result which saw Simon pip Iannone for runner-up spot in the championship.
Valencia MotoGP result:
1 J Lorenzo (Sp) Yamaha 46:44.622
2 C Stoner (Aus) Ducati 46:49.198
3 V Rossi (Ita) Yamaha 46:53.620
4 B Spies (USA) Yamaha 47:02.265
5 A Dovizioso (Ita) Honda 47:03.782
6 M Simoncelli (Ita) Honda 47:05.296
7 D Pedrosa (Sp) Honda 47:11.419
8 H Barbera (Sp) Ducati 47:13.910
9 A Bautista (Sp) Rizla Suzuki 47:14.073
10 R de Puniet (Fra) Honda 47:14.482
11 A Espargaro (Sp) Ducati 47:16.383
12 C Edwards (US) Tech 3 Yamaha 47:18.226
13 M Melandri (It) San Carlo Honda Gresini 47:21.244
14 H Aoyama (Jpn) Interwetten Honda 47:23.590
15 C Checa (Sp) Pramac Racing 47:40.791
1 J Lorenzo (Sp) Yamaha 383
2 D Pedrosa (Sp) Honda 245
3 V Rossi (It) Yamaha 233
4 C Stoner (Aus) Ducati 225
5 A Dovizioso (It) Honda 206
6 B Spies (US) Yamaha 176
7 N Hayden (US) Ducati 163
8 M Simoncelli (It) Honda 125
9 R de Puniet (Fr) Honda 116
10 M Melandri (It) Honda 103
11 C Edwards (US) Yamaha 103
12 H Barbera (Sp) Ducati 90
13 A Bautista (Sp) Suzuki 85
14 A Espargaro (Sp) Ducati 65
15 H Aoyama (Jpn) Honda 53
16 L Capirossi (It) Suzuki 44
17 M Kallio (Fin) Ducati 43
18 A de Angelis (SM) Honda 11
19 RL Hayden (US) Honda 5
20 K Akiyoshi (Jpn) Honda 4
21 C Checa (Sp) Ducati 1
22 W Yoshikawa (Jpn) Yamaha 1
125cc race result:
1 B Smith (GB) Aprilia 40min 25.648sec
2 P Espargaro (Sp) Aprilia @ 2.786
3 N Terol (Sp) Aprilia @ 3.149
4 M Marquez (Sp) Derbi@ 8.326
125cc championship final standings:
1 M Marquez 310 points
2 N Terol 295
3 P Espargaro 281
4 B Smith 223
Moto2 race result:
1 K Abraham (Cze) FTR 43:49.499
2 A Iannone (It) Speed Up 43:50.021
3 J Simon (Sp) Suter 43:50.082
Moto2 championship standings:
1 T Elias (Sp) Moriwaki 271
2 J Simon (Sp) Suter 201
3 A Iannone (It) Speed Up 199