Jorge Lorenzo ended his nine-year spell at Movistar Yamaha on a high note by winning the season-ending Valencia Grand Prix on Sunday.
The three-time MotoGP champion led throughout his final race for Yamaha to sign off in style in his homeland, winning the race at the Circuit Ricardo Tormo for a fourth time.
Champion Marc Marquez (Repsol Honda) made it a Spanish one-two, with Andrea Iannone (Ducati) filling the podium and Valentino Rossi (Movistar Yamaha) finishing fourth.
Lorenzo will race for Ducati next season, but leaves after delivering a parting gift in his swansong with a team he has served so well since 2008.
He crossed the line 1.185 seconds before compatriot Marquez, who recovered from a bad start to take the runner-up spot and finish the season with a 49-point lead at the top of the drivers' standings.
FITTING FAREWELL FOR ECSTATIC LORENZO
Lorenzo was quickest in both practice sessions on Friday before clocking a lap record to take pole on home soil.
Marquez's inability to get off to a flyer alongside his countryman meant it was pretty much plain sailing for Lorenzo, who led from start to finish.
Although Marquez produced a late charge, Lorenzo was not to be denied an emotional victory and leaves Yamaha with 44 victories and 107 podiums from 156 races.
ITALIAN DUO IN THRILLING PODIUM BATTLE
While it was two Spanish riders who sealed first and second, there was plenty of drama behind them in the closing stages as Rossi and Iannone vied for third.
Iannone, in his final race for Ducati before heading to Suzuki Ecstar, passed Marquez at the start and was involved in a thrilling battle for second with Rossi, but the Spaniard regained the position with 11 laps to go.
Rossi was passed by Iannone on the penultimate lap and the Yamaha man was unable to recover.
MORE WOE FOR PEDROSA
There were no home comforts for Dani Pedrosa in his first race following a three-week absence after suffering fractures to his collarbone, right leg and a metatarsal in Japan.
The Repsol Honda rider crashed out on his comeback, but was able to walk away unharmed. Cal Crutchlow (LCR Honda) also endured a miserable finale to the season when he came a cropper, but was unharmed.