Although the Italian veteran's existing contract was due to expire at the end of 2018, he has been expected to remain with the Japanese manufacturer for some time.

The seven-time premier class champion dropped a clear hint he would continue racing in the most recent Qatar test when he ruled out his VR46 team stepping up to MotoGP before 2021.

Rossi turned 39 last month, meaning his new contract will mean he continues racing until the age of 41 - making him the first MotoGP rider to race into his 40s since Colin Edwards in 2014.

He will partner current teammate Maverick Vinales for the next two seasons, with the Spaniard having already concluded a new agreement to remain with Yamaha until 2020 in January.

"When I signed my last contract with Yamaha, in March 2016, I wondered if that would have been the last contract as a MotoGP rider," said Rossi. "At that time, I decided that I’d take that decision during the following two years.

"During the last two years I came to the conclusion that I want to continue because racing, being a MotoGP rider, but especially riding my M1, is the thing that makes me feel good.

"I want to thank Yamaha - [team boss] Lin Jarvis and [team manager] Maio Meregalli in particular - for their trust in me, because the challenge is difficult: being competitive until I’m 40 years old!

"I know it’s going to be difficult and it requires a lot of effort from my side and a lot of training but I’m ready, I am not lacking in motivation, that’s why I’m signing for two more years."

The news Rossi is to stay at Yamaha extends a partnership that has yielded 56 MotoGP wins as well as the 2004, 2005, 2008 and 2009 premier class titles.

2019 MotoGP grid so far: