Double Formula 1 champion Fernando Alonso has announced that he will leave the championship at the end of the 2018 season.

The Spaniard teased a big announcement for several days since last week with many speculating it to be a move to IndyCar with him already competing in the FIA World Endurance Championship. A sponsor announcement was also rumoured.

But Fernando Alonso eventually announced leaving F1 through a video on Twitter and that he will not renew his contract with McLaren. He hasn’t retired from the sport, but stepped away at least for 2019.

“After 17 wonderful years in this amazing sport, it’s time for me to make a change and move on. I have enjoyed every single minute of those incredible seasons and I cannot thank enough the people who have contributed to make them all so special.

“There are still several grands prix to go this season, and I will take part in them with more commitment and passion than ever. Let’s see what the future brings; new exciting challenges are around the corner.

“I’m having one of the happiest times ever in my life but I need to go on exploring new adventures. I want to thank everyone at McLaren. My heart is with the team forever. 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.

“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 and everyone who has contacted me during this time.

“Finally, I would also like to thank my former teams, team-mates, 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.”

Last year Alonso tried his hands at Indy 500 and this year he has already won in the Le Mans 24 Hours with Toyota. He is only a step away from completing the unofficial ‘Triple Crown’ – just needing a win in the Indy 500.

Zak Brown, McLaren Racing’s Chief Executive Officer, said: “Fernando is not only an outstanding ambassador for McLaren but also for Formula 1. His 17 years in the sport, as arguably the pre-eminent driver of his generation and undoubtedly an F1 great, have added another layer to Formula 1’s rich history.

“There is a time for everyone to make a change and Fernando has decided the end of this season to be his. We respect his decision, even if we believe he is in the finest form of his career. Our open dialogue with Fernando has meant we could plan for this eventuality.

“While evaluating his future during the past months, Fernando’s competitiveness has been undimmed. He has continued to perform at the highest level throughout, as we know he will do in the remaining nine races of this year’s championship.

“I know that the entire team joins me in paying tribute to Fernando’s enormous contribution to McLaren; he is a legend both for the championship and for the team. Fernando is an important part of our story and will join an illustrious line of McLaren drivers. On behalf of Shaikh Mohammed, Mansour and our entire board, we wish Fernando every success in the future.”

Alonso made his F1 debut in 2001 with Minardi and moved to a test role with Renault in 2002 before taking a full-time seat in 2003. He won his first race in Hungary that year and his first title in 2005, followed it up with his second in 2006.

Since then he has been yearning for a third title, having raced for Ferrari and McLaren in the process. His last few years has been difficult with his last win coming with Ferrari in 2013 Spanish GP.