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."
|Khan wants to bow out by winning blockbuster Brook fight|
|Is winter coming? Game of Thrones stars descend on Monaco|
|Root urges England´s batsmen to ´find a way´|
|Lovren, Van Dijk absolve Karius of blame|
|We all know where our nipples are - Hansen welcomes tackle trial|
|Rooney would thrive in MLS, says DC United boss|
|Pakistan complete demolition of sorry England|
|Curry, Durant reveal the secret to Thompson´s success|
|Salah will miss World Cup, claims Saudi sports administrator|
|Deschamps marvels at Zidane´s incredible Champions League success|
|FIA satisfied Ferrari ´inside the rules´|
|NSW Origin hopeful Moylan pulls the strings for rampant Sharks|
|Champions League blunders will stay with Karius - Clemence|
|Warriors assuming Iguodala won´t play game seven, Kerr says|
|Lampard confirms Derby talks over vacant managerial position|
|French Open 2018: The science behind Nadal´s clay-court dominance explained|
|Walsh to continue as Bangladesh head coach|
|Bale makes emphatic point after Champions League omission|
|Casemiro: I bet Ronaldo stays at Madrid|
|Brewers pull away for blowout win over Mets|
|Warriors´ outburst sinks Rockets, forces game seven|
|MLS Review: Timbers win sixth straight, Techera scores hat-trick|
|It was like wrestling – Klopp unhappy with Ramos challenge on Salah|
|McKinnon says 49ers aiming to win Super Bowl this season|
|Choo makes history with walk-off home run, Rangers seeking ball|
|Shin-Soo Choo makes history with walk-off home run, Rangers seeking ball|
|Marcelo: I think Cristiano Ronaldo will stay at Real Madrid|
|Miller-Uibo shines as Semenya sets record in Eugene|
|Rose extends lead as Spieth slides|
|Prompt recovery, Salah – Ramos wishes Liverpool star well|
|Indians reliever Miller headed back to disabled list|
|Warriors´ Iguodala to miss game six against Rockets|
|I shouldn´t have done it – Ronaldo accepts future comments mistimed|
|Klopp: Liverpool behind Karius after Champions League horror show|
|Karius´ final blunders could destroy his career – Kahn|
|Zidane understands Bale frustration|
|Bale, Karius send Twitter into overdrive in action-packed Champions League final|
|Ronaldo: It should be called the CR7 Champions League|
|Zidane revels in Madrid´s third successive Champions League title|
|I lost Liverpool the game – Karius apologises for Champions League errors|
|Barcelona congratulate Champions League winners Real Madrid|
|Salah injury update: Egyptian FA calm World Cup fears|
|Ronaldo must stay with Madrid - Zidane|
|Champions League final player ratings: Bale stars as Karius shocker costs Liverpool|
|Cristiano is happy and will continue to be happy – Perez cools Ronaldo future talk|
|Win as a team, lose as a team - Liverpool captain Henderson not blaming Karius|
|Modric: Madrid have built dynasty like Bulls, Celtics and Lakers|
|Where would Cristiano go? - Benzema predicts Ronaldo stays at Madrid|
|We do not think about that - Zidane shrugs off Ronaldo exit talk|
|The divine right of kings: Zidane´s Real Madrid ride luck all the way to greatness|
|Klopp fears Salah will miss World Cup|
|Du Plessis returns, 17 uncapped players selected by South Africa|
|Bale demands playing time after Champions League heroics|
|Ramos: Ronaldo is indispensable to Real Madrid|
|It´s been beautiful to play for Real Madrid - Ronaldo hints at shock exit|
|Salah injury marked beginning of the end for Liverpool|
|Bale double makes Champions League history|
|Bale, Mandzukic & the best Champions League final goals|
|Real Madrid 3 Liverpool 1: Brilliant Bale undoes Klopp and calamity Karius|
|Jokanovic proud Fulham stuck to style in Wembley win|
|Real Madrid´s Carvajal limps out of final to prompt Spain fears|
|Broughton and Catalans continue fine form|
|Tearful Salah off injured in Champions League final|
|Leinster complete historic double by beating Scarlets|
|Lions snatch win from Stormers, Brumbies stun Bulls|
|Bale sits out warm-up ahead of Champions League final|
|Cavaliers´ Kevin Love ruled out of game seven|
|Pavlyuchenkova saves two match points to win Strasbourg epic|
|Benzema comparisons have made me stronger, says Giroud|
|Pakistan´s victory charge frustrated by Buttler and Bess|