Petronas Yamaha have officially confirmed Valentino Rossi will be riding for them in the 2021 MotoGP season.
The long-rumoured deal was finally announced ahead of qualifying for the Catalan Grand Prix, with Rossi to join Franco Morbidelli and complete the satellite team's line-up for next year.
However, the seven-time world champion in the premier class will still be using factory machinery as part of the deal.
The legendary Italian will be replaced at the works Yamaha team by Fabio Quartararo, meaning the pair are effectively swapping places at the end of the current campaign.
Rossi will turn 42 in February but retains the hunger to continue riding, having made his MotoGP debut back in 2000.
"I thought a lot before taking this decision, because the challenge is getting hotter and hotter. To be at the top in MotoGP you have to work a lot and hard, to train every day and lead an 'athlete's life', but I still like it and I still want to ride," Rossi said.
"In the first half of the year I made my choice and I talked with Yamaha, who agreed with me.
"They told me even if there was no place for me in the factory team, the factory bike and the factory support were guaranteed."
Petronas Yamaha boss Razlan Razali revealed his delight at signing Rossi to a team who only made their MotoGP debut in Qatar last year.
"His experience will be a great asset to the team as we move into our third season in MotoGP and we are sure we will be able to learn a lot from Valentino," Razali said.
"At the same time, we will do our absolute best to assist him to be competitive to reward him for the trust he has in us as a team. We are humbled by this opportunity and ready to take on the challenge.
"We believe that the combination of Valentino and Franco will provide a truly formidable force on track to help us in our goal of being as competitive as possible together next year. We can't wait!"