Valentino Rossi came close to delivering a dream victory in his record 300th premier-class race, at Silverstone on Sunday.

The Movistar Yamaha rider led until lap 18 of 20, when Ducati's Andrea Dovizioso and The Doctor's own team-mate Maverick Vinales overtook in quick succession.

But Rossi kept up the fight and crossed the line just 0.749s from victory.

Afterwards, the 38-year-old pledged to continue as a MotoGP rider for as long as he can produce such performances.

"I think this is a very good way - a great way would be to win - to make my 300th race in MotoGP. Staying a lot in front and fighting for the victory," declared Rossi, whose current Yamaha contract expires at the end of next season.

"This is my target and while I have this speed, and I'm able to fight with the top guys, I will continue."

Rossi had been able to keep clear of Dovizioso, Vinales, Marc Marquez and Cal Crutchlow for much of the grand prix, but was 'frustrated' when his late-race fears materialised and he was unable to retaliate.

"I did a good start and I was able to ride well and give the maximum for all the race. I enjoy a lot because I have a good pace, so I can stay in front and I can ride the bike in a good way," he said.

"We were a little bit worried because we know that we suffer a bit in the last laps. But sincerely speaking, with five laps to go, I thought I could do it. But unfortunately I suffer a bit too much in the last laps and Dovi and Maverick overtake me.

"It was a bit frustrating because I wasn’t strong enough to try to fight, to re-overtake.

"In the last two laps I tried everything I can, and two or three times I arrived in the corner and didn’t know if I could stop!

"But  I'm happy because to arrive on the podium was my target and it was a great race. We all arrive close together. We still have to work for the last laps, but this weekend we improve and we understand something important."

Rossi had been off the podium for the three events leading up to Silverstone, following his Assen win. Did the recent private test at Misano make the difference?

"We worked on electronics in acceleration, to save a little bit the tyre. Was nothing big, but here worked. About the setting, is very similar to Austria," said Rossi, despite rumours he and Vinales may have been using a '2018' chassis.

"The problem this year is sometimes you arrive and the bike is impossible to ride. At other tracks, like here but also Brno, you arrive and the bike is good, the tyre work quite well.

"I feel good with the bike from Friday, I can enjoy when I ride, so I was quite relaxed before the race - especially because I think we have to enjoy this weather! To ride at Silverstone with the MotoGP, in this temperature, no wind and completely dry, is great fun.

"Now we hope that we can be strong in the last part of the race, before the end of the championship."

Indeed, Rossi feels a solution is intrinsically linked to his title hopes. Marquez's retirement means the Italian remains fourth in the standings, but has cut the gap to the top from 33 to 26 points behind new leader Dovizioso.

"I saw 'Marquez out' [on the pit board], I think it's important to know during a championship like this, but nothing changed for me. Because I want to try to win and I am at the maximum. There are six races to go so you have to give the maximum anyway.

"I'm always very realistic. I am 26 points behind, it's not a lot, and there are six races still to go. I'm very happy to stay [in the title fight], everything is open and I will give all the maximum for try.

"But I am not strong enough in the last laps to fight for the championship. We have to try to improve this problem. I hope as soon as possible."

The first of Rossi's 300 premier-class races was held at Suzuka in 2000, marking the start of what is now 18 seasons at the very top of two-wheel motorsport. Yet Rossi agreed that the 2017 campaign - with five different winners and the top-five still covered by 35 points - is special.

"I think it's something special because usually you fight with another one or two riders, maximum three. But this time there are five. Also during the practice you can be out of the top ten very easy."

And his prediction for the remainder of the season?

"I hope to arrive in Valencia with the top five riders equal on points, make a very good weekend with good weather on Friday and Saturday - and then on Sunday morning it will rain a lot!" he laughed.

"I hope the championship will be decided like this in Valencia!"

The next round will be Rossi's home event, at Misano.