Jorge Lorenzo made MotoGP history as he became only the third rider to come from behind in the standings to claim the title at the season finale, which he did with the Valencia win.
Under the Mediterranean sunshine 110,000 spectators packed into the Ricardo Tormo circuit to witness history in the making at the grand finale of the MotoGP season.
Although there were fears that the race would be insipid given Valentino Rossi's back of the grid penalty, a heroic drive from the Italian kept the excitement bubbling.
Having started last on the grid the seven-time MotoGP Champion, who arrived in Spain with a seven-point advantage over Lorenzo, picked off his rivals one by one.
Inside the top ten after three laps Rossi's charge was slowed as he caught up to riders on better machines than the backmarkers. And all the while Lorenzo, who started from pole position, led the race ahead of the Hondas of Marc Marquez and Dani Pedrosa.
Halfway through the race Rossi was up to fourth with just the Hondas – 12 seconds up the road – between him and race leader Lorenzo. More importantly they were standing between Rossi and an eighth World title.
But with the Yamaha rider unable to reduce the deficit to third-placed Pedrosa, it looked as if Lorenzo was in for a perfect afternoon. Marquez had other ideas.
He kept Lorenzo within his sights and with nine to go had closed right up on the race leader's rear tyre. Shadowing the Italian lap after lap it became a three-rider tussle for the win when on the penultimate lap Pedrosa not only joined the battle but engaged Marquez only for the out-going Champ to retake the position.
Lorenzo held his nerve and his position to win the season finale in Valencia and in doing so came from behind to win his third MotoGP World title by five points over Rossi.
He was joined on the podium by Marquez and Pedrosa while a disappointed Rossi, who had led the standings throughout the entire season, had to settle for fourth on the day and second in the title race.
Pol Espargaro was fifth ahead of Bradley Smith, Andrea Dovizioso and Aleix Espargaro.
Nicky Hayden completed his final MotoGP race in 17th place.
1 Jorge LORENZO Movistar Yamaha MotoGP 45'59.364
2 Marc MARQUEZ Repsol Honda Team +0.263
3 Dani PEDROSA Repsol Honda Team 0.654
4 Valentino ROSSI Movistar Yamaha MotoGP 19.789
5 Pol ESPARGARO Monster Yamaha Tech 3 26.004
6 Bradley SMITH Monster Yamaha Tech 3 28.835
7 Andrea DOVIZIOSO Ducati Team 28.886
8 Aleix ESPARGARO Team SUZUKI ECSTAR 34.222
9 Cal CRUTCHLOW LCR Honda 35.924
10 Danilo PETRUCCI Octo Pramac Racing 39.579
11 Maverick VIÑALES Team SUZUKI ECSTAR 39.746
12 Michele PIRRO Ducati Team 47.053
13 Yonny HERNANDEZ Octo Pramac Racing 54.081
14 Alvaro BAUTISTA Aprilia Racing Team Gresini 56.646
15 Scott REDDING EG 0,0 Marc VDS 57.278
16 Hector BARBERA Avintia Racing 57.363
17 Nicky HAYDEN Aspar MotoGP Team 58.742
18 Stefan BRADL Aprilia Racing Team Gresini 59.086
19 Loris BAZ Forward Racing 1'04.339
20 Toni ELIAS Forward Racing 1'04.413
21 Jack MILLER LCR Honda 1'05.212
22 Anthony WEST AB Motoracing 1'27.281
Mike DI MEGLIO Avintia Racing 6 Laps
Eugene LAVERTY Aspar MotoGP Team 7 Laps
Broc PARKES E-Motion IodaRacing Team 9 Laps
Andrea IANNONE Ducati Team 28 Laps