Fernando Alonso will contest the 2018 Formula 1 season for McLaren, it was confirmed on Thursday, finally ending speculation that the two-time world champion could leave the team after what has been another frustrating campaign.

Alonso, who will again race alongside Stoffel Vandoorne, had been widely expected to re-sign with McLaren ever since the team announced last month that they are to switch from Honda to Renault power next year – a move they hope will return them to the sharp end of the grid.

“It’s fantastic to be able to continue my relationship with everybody at McLaren,” said Alonso. “It was always where my heart was telling me to stay, and I really feel at home here. This is a fantastic team, full of incredible people, with a warmth and friendliness that I’ve never experienced elsewhere in Formula 1. I’m incredibly happy to be racing here.

“Just as important, McLaren has the technical resource and financial strength to be able to very quickly win races and world championships in F1. Although the last few years have not been easy, we have never forgotten how to win, and I believe we can achieve that again soon."

It will be Alonso’s fourth successive year with McLaren and his fifth in total. He rejoined the team ahead of the 2015 season when the Woking squad also revived their previously, highly successful partnership with Honda.

They were unable to rediscover that success, though, as the Japanese auto giant struggled to get on top of the current generation of hybrid F1 power units, and Alonso has yet to better fifth place in Honda-powered machinery.

“The last three years have given us the momentum to plan and build for the future, and I’m looking forward to that journey," he added. “I’m excited for our future together – and I’m already working hard to make it a success.”

Commenting on retaining Alonso for next season, McLaren’s Racing Director, Eric Boullier, said: “With Fernando, you really can’t ask for a better driver to deliver a result for you on a Sunday afternoon – and I think everybody in Formula 1 would acknowledge that sentiment.

“He’s always been clear to me that this is a team he loves, and that his heart has always been set on staying. Today’s announcement shows that he’s fully committed to racing and winning as a McLaren driver, and, while we’ve often shared his frustrations over the past few years, we now feel that we can deliver on our promise to give him a competitive car next season.

“Consistency of driver line-up is one of those small but essential elements that really helps a team to maintain momentum, and, with Fernando and Stoffel, we’re lucky to be writing a fresh chapter with what we believe to be the best driver line-up in Formula 1.”