Honda's Marc Marquez became the youngest to win four MotoGP world titles as team-mate Dani Pedrosa took victory in a tense Valencia Grand Prix.
Marquez only needed to finish inside the top 11 in the final race of the season to retain his title, but survived a scare when he nearly came off his bike taking the lead from Yamaha's rookie Johann Zarco with seven laps to go.
The 24-year-old slid off the track and into the gravel at 90mph but somehow managed to keep his bike upright and rejoined again down the field, but the Spaniard's only title challenger Ducati's Andrea Dovizioso, who had to win the race, was unable to take advantage and crashed out in third place two laps later.
Marquez fought back to finish third behind Pedrosa, who chalked up his second win of the season.
Pedrosa had kept pace with the front runners before overtaking second-placed Zarco with a couple of laps to go to win by 0.337 seconds with Marquez a further ten seconds adrift.
The title winner told BT Sport: "Amazing feeling. During the race I was trying to stay calm and trying to control the situation.
"Then I felt it was time to take the plunge because I felt really good, but I lost control on Turn 1 and braked too late. It was Marc's style to the end."
It was the 28th time this season that Marquez has come off the track in qualifying and races, despite winning the title by 37 points.
It was a frustrating afternoon for Dovizioso who was holding on to faint hopes of his first MotoGP title.
The Italian had been unable to overtake team-mate Jorge Lorenzo to put any real pressure on Marquez despite Lorenzo being told by his pit crew to let him past. As the Ducatis tried to keep pace with those ahead they both crashed within half-a-lap of each other.
Suzuki's Alex Rins took a career-best fourth, while Valentino Rossi was fifth for Yamaha, but the Italian was beaten to fourth in the standings by Pedrosa by two points.
Watch highlights of the Valencia MotoGP on BT Sport 2 at 7pm on Sunday, 11 November and again on BT Sport 2 on Monday, 12 November at 8am.
Image: Getty/ Micro Lazzari
eir Sport channels are available across the eir Vision, Sky and Vodafone TV platforms as well as on the eir Sport app. All 7 channels in the eir Sport pack are available for free if you are a residential eir broadband customer.