Fernando Alonso says he could return to Formula 1 after 2019 and has indicated his absence from the grid may only be temporary if McLaren's form improves.

The two-time world champion revealed on Tuesday that he will not be racing in F1 next season, but stopped short of declaring it a retirement.

He paid tribute to McLaren, who he rejoined in 2015 but has failed to compete for a podium due to a dismal three-year spell with Honda and McLaren's own struggles this year since switching to Renault.

Alonso suggested a McLaren revival could facilitate a return to F1.

Alonso's shocking news:

"My heart is with the team forever," said Alonso. "I know they 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.

"I have built so many great relationships with many fantastic people at McLaren, and they have given me the opportunity to broaden my horizons and race in other categories. I feel I am a more complete driver now than ever."

Alonso currently contesting the FIA World Endurance Championship superseason, which will run into 2019, and is expected to add an IndyCar programme to that.

He made his Indianapolis 500 debut last year and the famous race is all he has left to win to clinch motorsport's unofficial triple crown, having claimed victory on his Le Mans 24 Hours debut with Toyota this year.

Alonso has not communicated his 2019 plans, but said he made the call to stop racing in F1 earlier this year.

"I made this decision some months ago and it was a firm one," he said.

"Nevertheless, I would like to sincerely thank Chase Carey and Liberty Media for the efforts made to change my mind and everyone who has contacted me during this time.

"Finally, I would also like to thank my former teams, teammates, competitors, colleagues, partners, journalists and everyone I have worked with in my F1 career.

"And, especially, my fans all over the world. I am quite sure our paths will cross again in the future."

Alonso's departure from McLaren confirms that both seats are up for grabs at the British team next year.

Stoffel Vandoorne has yet to earn a contract extension, while reserve driver Lando Norris has admitted he may benefit more from a year of free-practice running before graduating to F1 in 2020.

Motorsport.com understands that Carlos Sainz is a serious option to McLaren, so long as Red Bull does not call him up to replace Daniel Ricciardo before its option on the Spaniard expires next month.

McLaren CEO Zak Brown said that the team's "open dialogue with Fernando has meant we could plan for this eventuality" but made no mention of who features in that plan.