Fernando Alonso has agreed a new deal to remain with McLaren for the 2018 Formula One season.
The two-time Formula One champion has been critical of his team in a frustrating season that has only brought him 10 points.
McLaren will switch from Honda to Renault power units next year after a 2017 to forget and Alonso has decided to stay put as Stoffel Vandoorne's team-mate.
The Spaniard said: "It's fantastic to be able to continue my relationship with everybody at McLaren.
"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.
"The last three years have given us the momentum to plan and build for the future, and I'm looking forward to that journey.
"I'm excited for our future together – and I'm already working hard to make it a success."
Alonso, who missed the Monaco Grand Prix to race in the Indianapolis 500, had warned the Woking-based team that they must provide him with a car capable of winning to convince him to stay.
Racing director Eric Boullier spoke of his delight that the 36-year-old has agreed to a fourth season with McLaren.
He 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."
|Maltese champions Valletta want Usain Bolt|
|It would have been normal to kill them! Luis Enrique slams abysmal Spain|
|Seahawks, Trail Blazers owner Paul Allen dies aged 65|
|Red Sox ace Sale released from hospital, still set for game five|
|Beer-throwing fan banned by Patriots|
|Southgate lauds ´tremendous´ attackers after famous Spain win|
|Djokovic closing in on summit as he scales new heights|
|Monaco the natural move for Henry - Martinez|
|Ending England drought a ´beautiful feeling´ – Sterling|
|Halep to face Pavlyuchenkova in Moscow comeback|
|NBA 2018-19: Five non-LeBron James storylines to follow|
|Spain 2 England 3: Kane inspires Three Lions as Sterling ends drought in style|
|Bosnia-Herzegovina 2 Northern Ireland 0: Dzeko double leaves O´Neill´s side on the brink|
|Mannarino stops the rot in Moscow|
|Neymar pleased Brazil will not face Messi in Argentina clash|
|Buccaneers fire defensive coordinator Mike Smith after loss to Falcons|
|´Surprised´ Deschamps accepts he could´ve made more effort with Koscielny|
|Kuwait 0 Australia 4: Socceroos deliver win for new coach Arnold|
|Van Dijk fit for Liverpool return - Koeman|
|NBA 2018-19: Eastern Conference predictions|
|NBA 2018-19: Five rookies to watch|
|Denly replaces injured Dawson in England ODI squad|
|Low confirms under-fire Neuer to start against France|
|NBA 2018-19: Western Conference predictions|
|Bolt offered two-year deal by European club, says agent|
|NBA 2018-19: LeBron the Laker - what it means|
|Griezmann ahead of Mbappe for Ballon d´Or - Modric|
|Billy Vunipola ruled out with fractured arm|
|Get the chequebook out! - Mayweather talks up potential Khabib clash|
|Amla ruled out of Australia tour|
|Class act Hamilton more complete than ever - Wolff|
|NBA 2018-19: It´s a big season for - Ball, Kawhi, Carmelo, Love & Cousins|
|Bellew: I have no fear of Usyk|
|Birthday boy Ozil is the most creative player in Europe|
|CSA reveals De Villiers and Rabada involved in Mzansi Super League|
|FA condemns England supporters involved in trouble in Seville|
|Gascoigne hits back over Scottish Hall of Fame snub|
|NBA 2018-19: LeBron closing in on Jordan, Curry chasing Miller and Allen|
|Ter Stegen should start ahead of Neuer for Germany – Matthaus|
|England´s Sterling impressed by Sancho´s work ethic|
|Vandoorne seals switch to Formula E|
|Halep to end 2018 as world number one|
|Sri Lanka´s Jayasuriya charged by ICC with breaching anti-corruption code|
|Vermaelen out for six weeks with hamstring injury|
|LeBron and Irving did not fall out, says ex-Cavs trainer|
|Ramsey out of Wales´ clash with Republic of Ireland|
|Bolt angry with drugs test|
|Bad luck is not a coincidence – Kimmich concerned by Germany form|
|Mahomes: Chiefs need to win like Brady and the Patriots|
|Schuster warns Real Madrid not to panic-buy striker in January|
|We´re here to win! - Paine not happy celebrating a draw|
|Injured Thauvin out of Germany clash|
|Southgate hits out at early Premier League start|
|Modric to Inter talk is ´fantasy´, says Guardiola|
|Pats hand first loss to Chiefs after wild shoot-out|
|Cowboys, Ravens dominate as Pats beat Chiefs in NFL classic|
|Brady becomes first QB to 200 regular-season wins in NFL|
|Red Sox level series against Astros|
|Mbappe leaves red-faced Dembele on his backside|
|Red Sox ace Sale admitted to hospital with stomach illness|
|From UFC to NFL? McGregor throws pass for Cowboys|
|Ancelotti praises ´dangerous´ Mbappe|
|Uncapped Papalii named in All Blacks squad|
|Kane would star in LaLiga – Ramos|
|Guardiola unsure about Man City´s Champions League chances|
|Dzeko: Premier League return? You never know|
|Gurley dominates to help Rams beat Broncos|
|Butler expected to play Timberwolves´ opener against Spurs|
|I´m no wizard – Mancini asks for patience with Italy|
|The Messi and Ronaldo era is phenomenal – Guardiola|