Three-time world champion Jorge Lorenzo signed off his nine-year Yamaha career with victory in the Valencia Grand Prix on Sunday, the final event of the season.
The Spaniard led from pole position to take victory from world champion Marc Marquez on a Honda with Andrea Iannone on a Ducati taking third place.
Lorenzo, who will switch to Ducati in 2017, secured third in the championship behind Marquez and Yamaha teammate Valentino Rossi, who was fourth on Sunday.
"Now I can relax," said Lorenzo after a 44th career win. "It's very emotional after nine years with Yamaha.
"I didn't expect to win today because I knew Marc was very strong. I suffered in the last 10 laps because he was pushing and attacking.
"It was an incredible weekend with a perfect first few laps, pole position, fastest lap, and victory.
"I arrived here in MotoGP at 20 years old, taking my first pole position on my first race.
"After almost 10 years I leave with a pole position and a victory, I think I couldn't have given Yamaha a better present than this for their support and their hard work during these years."
Marquez's second-place finish allowed Honda to claim a 22nd constructors' title.
The 23-year-old Spaniard, who wrapped up his third world title in Japan with three races to spare, won five races in 2016.
"Today was the worst start of the year," admitted Marquez, who lost a number of places on the first lap from second on the grid.
"There was a mistake or problem with the clutch, a big wheelie and I lost a lot of time.
"I pushed like I had nothing to lose, and I was catching Jorge. It was difficult but I tried, and I ran out of laps. But no excuses ? the race is 30 laps and Jorge won."
For Rossi, who started on the front row, the result left him still seeking a first win since 2004 at the circuit.
"The 2016 season brought a lot of positive things: second place in the championship, a lot of podiums and front-row starts," said the veteran.
"Next year I want to try to win more races -- more than two -- but we are always competitive."
World champion Johann Zarco, riding a Kalex, won the Moto2 race for his 16th career victory.
The French rider, who will race in the elite MotoGP category next season, captured his seventh win of the campaign.
Switzerland's Thomas Luthi was second on Sunday with Italy's Franco Morbidelli coming home in third place.
Luthi was able to claim the runners-up spot in the championship ahead of Spain's Alex Rins, who was fifth in the race.
South African Brad Binder riding for KTM won the Moto3 race.
The world champion landed his seventh win of the season as he saw off Spaniard Joan Mir and Italian Andrea Migno, also of KTM.
Italian Enea Bastianini secured second spot in the championship after placing fourth on a Honda.