Double world champion Fernando Alonso will retire from Formula One at the end of the season, his team McLaren said in a statement on Tuesday.
The 37-year-old Spaniard is competing in his 17th Formula One season and his fifth with McLaren, and has been widely tipped to race in the Indianapolis 500 next year as he attempts to win the 'Triple Crown of Motorsport'.
Alonso, a double Monaco Grand Prix winner, won the Le Mans 24 Hours on his debut with Toyota in June this year and is ninth in the Formula One drivers' championship standings.
"After 17 wonderful years in this amazing sport, it's time for me to make a change and move on," Alonso said.
"There are still several grands prix to go this season, and I will take part in them with more commitment and passion than ever."
McLaren worked with Andretti Autosport to field a car for Alonso for the 2017 Indy 500 where the Spaniard put himself in contention leading for 27 laps before suffering an engine failure with 21 laps remaining.
McLaren has been exploring the possibility of working again with Andretti to field an IndyCar team to run the entire series next year or might consider putting together their own team.
Ryan Hunter-Reay, winner of the 2014 Indy 500 and a team mate of Alonso's with Andretti for the one race, said the Spaniard would be welcomed back and would be a great addition to the series.
"It would be appealing to me if I were him," said Hunter-Reay during a conference call ahead of this weekend's IndyCar race at Pocono.
"I spent time with him as his team mate and know he's as hungry as ever to win.
"We worked very well together and would welcome him no doubt but I have no idea where this whole thing is going right now.
"I don't know where McLaren stands with it... a lot of speculation at the moment but I think he would be a great addition to IndyCar and have a lot of fun here."
Alonso thanked Formula One chief executive Chase Carey and the sport's owner Liberty Media Corp for trying to get him to change his mind and left the door open on a possible return to the circuit.
"I know (McLaren) will come back stronger and better in the future and it could be the right moment for me to be back in the series; that would make me really happy," he added.
"I made this decision some months ago and it was a firm one. Nevertheless, I would like to sincerely thank Chase Carey and Liberty Media for the efforts made to change my mind."
Fellow Spaniard Carlos Sainz, who will lose his place on the Renault team to Daniel Ricciardo next season, is a strong contender to replace Alonso along with McLaren reserve driver Lando Norris.
Sainz was loaned to Renault by Red Bull for 2018 after the French manufacturer needed a replacement for under-performing Briton Jolyon Palmer.
Alonso started his Formula One career with the now-defunct Minardi team in 2001 and moved to Renault two years later. He became the youngest world champion in Formula One history with Renault in 2005, winning again the following year.
His storied career has included 32 wins, 22 pole positions and 97 podiums so far, although he has not won a race since wining the 2013 Spanish Grand Prix with Ferrari. He has not finished on the podium since rejoining McLaren in 2015.
"There is a time for everyone to make a change and Fernando has decided the end of this season to be his," McLaren Chief Executive Zak Brown said.
"We respect his decision, even if we believe he is in the finest form of his career."