McLaren on Thursday confirmed it extended its contract with star driver Fernando Alonso.

McLaren only said Alonso would contest the 2018 Formula 1 World Championship with the team, but in an interview the Spaniard said he’s there for the long haul.

“We never discuss the contract clauses and we are not going to do it now, but it's a long-term contract and we'll see how things go,” he said.

His current teammate, Belgian youngster Stoffel Vandoorne, has also been confirmed for a McLaren seat in 2018.

Alonso’s current contract runs until the end of the 2017 season, and there were doubts whether he would extend it due to the frustration of the past three seasons. McLaren has gone from a top team to the back of the ranks since switching to Honda power units in 2015, which is when Alonso joined the team.

Likely influencing Alonso’s decision to stay is McLaren’s decision to source power units next season and beyond from Renault, the team with which Alonso won his two world championships (2005 and 2006). McLaren had been under contract with Honda until 2024 but the two in September agreed to go their separate ways. Honda will still be in F1 next season, as a supplier to Red Bull-feeder team Toro Rosso.

“McLaren has the technical resource and financial strength to be able to very quickly win races and world championships in F1,” Alonso said in a statement. “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.”