Valentino Rossi will remain in MotoGP until at least the age of 41, after agreeing a new two-year contract with the factory Yamaha team.

On the eve of the Qatar season-opener it was announced that - as expected - the Italian legend will remain alongside team-mate Maverick Vinales for the 2019 and 2020 seasons.

"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," Rossi said. "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.

"Having the opportunity to work with my team, with Silvano, Matteo and all my mechanics, and working with all Japanese engineers, Tsuji-san, and above all Tsuya-san, is a pleasure - I’m happy.

"I want to thank Yamaha - Lin Jarvis and 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."

Yamaha Racing managing director Lin Jarvis: "The confirmation of Valentino’s two-year extension of his Agreement with Yamaha is a great way to start the 2018 season that kicks off officially on Friday in Qatar. The news may not be a great surprise because Valentino has made it clear that he wanted to continue to race, but the reconfirmation will surely come as welcome news for his millions of fans around the world.

"It was very easy to reach an agreement together – as a Factory Team we need top riders capable to win and with the total commitment to do what it takes to achieve the goal. Despite his many years in the sport and his 39 years, Vale is as committed today as he ever was and there is no doubt he is still a top rider, as witnessed most recently by his second position in the final pre-season test here in Qatar. Now it is our job as a team and a factory to give him the best possible YZR-M1 to let him fight for race wins and championship success.

"Having both Maverick and Valentino now signed for 2019-20 allows us to just focus all of our energy on the 2018 season and to be strong contenders at every single MotoGP Grand Prix. It promises to be a highly competitive season and like all the fans - we in Yamaha are truly excited to go racing on Sunday night here in Losail."

Rossi holds the all-time 500cc/MotoGP win record with 89 race victories and is second only to Giacomo Agostini for race wins in all grand prix classes (115).

After winning a title each in the 125 and 250cc classes with Aprilia, Rossi raced for Honda from 2000-2003, Yamaha 2004-2010, Ducati 2011-2012 and Yamaha since 2013.

The Ducati years aside, Rossi has claimed at least one victory in every premier-class season.

Although he hasn’t won a title since 2009, Rossi finished runner-up in 2014, 2015 (when he came within five points of a tenth world championship) and 2016.

Last season saw the Italian suffer the second broken leg of his career, this time in a training accident. He defied medical expectations by only missing one race and returned to the podium just 51 days after the injury, in Australia.

Uncomfortable with the M1's handling for much of last year, Rossi has been boosted by Yamaha's return to a 2016-style chassis for this season.

However he still feels the M1 lacks electronic-related acceleration and is concerned by how tyre-sensitive the bike seemed to be from track-to-track in pre-season testing.

Nonetheless, Rossi heads into this weekend having set the second fastest lap, behind satellite Yamaha rider Johann Zarco, in the final test in Qatar. Rossi finished third in last year's Losail race.

Rossi joins Vinales, reigning champion Marc Marquez (Repsol Honda), Cal Crutchlow (LCR Honda), Franco Morbidelli (Marc VDS Honda), Xavier Simeon (Avintia Ducati) and Francesco Bagnaia (Pramac Ducati) in securing his place on the 2019 MotoGP grid.