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."
|Koepka in control in South Korea, on track to become world number one|
|Dovizioso grabs pole at Motegi, Marquez sixth|
|Langer backs Marsh for ODI squad|
|Butler turns boos to MVP chants in Timberwolves´ first win|
|Brewers force game seven against Dodgers in NLCS|
|Guardiola admits Hart decision may have been a mistake|
|Vieira: Balotelli the same now as he was at 16|
|Butragueno backs under-fire Lopetegui|
|Liverpool´s defensive improvement has hurt attack – Klopp|
|Butler booed by Timberwolves fans during introductions|
|Pochettino: Dier´s Ramos tackle highlighted Spurs´ attitude|
|Man City working on new deal for Sane – Guardiola|
|Golden Knights sign RW Tuch to seven-year extension|
|Bryant explains how Lakers could beat Warriors|
|Finals hopefuls Isner, Fognini into Stockholm semis|
|Browns trade running back Hyde to Jaguars|
|Mourinho: I´d love to have Hazard at Manchester United|
|Hamilton´s title chances enhanced by Vettel´s grid penalty|
|Deja vu for Enisei as La Rochelle inflict another thrashing|
|Five-star Jovic makes Bundesliga history|
|Liverpool´s scoring slump no concern for cautious Klopp|
|He´s the Special One - Sarri insists he is not on Mourinho´s level yet|
|Second-half blitz guides Leicester to European success|
|Sheffield Wednesday 1 Middlesbrough 2: Besic, Assombalonga see off Owls|
|Goerges rallies to reach Luxembourg Open final, Jabeur makes history|
|Howe: Transfer speculation will not disrupt Ake|
|´Do we really want opera every night?´ - Klopp not changing Nations League view|
|Vile and abhorrent – Chelsea´s Carney responds to online abuse|
|Giants WR Beckham Jr. explains why he might cramp up: ´I really don´t like water´|
|Man City pay training-pitch tribute to Joe Hart|
|Neymar to be rested as Tuchel rubbishes Ballon d´Or concerns|
|Sarri ´not interested´ in Christensen father´s quit threat|
|Cardinals fire offensive coordinator McCoy after 1-6 start|
|Neymar return unlikely, but anything can happen – Valverde|
|Bairstow a doubt for fourth ODI|
|Manchester United fined for late arrival and delayed kick-off against Valencia|
|Australia-Pakistan chat not ´especially polite´ - Sarfraz|
|Pogba relishing ´pressure game´ against in-form Hazard|
|Don´t bet on Cardiff survival, warns Warnock|
|Buffon enjoying Tuchel´s methods at PSG|
|RIP to Wimbledon epics! Isner feels like The Undertaker following final-set tie-break rule|
|Sevilla performance sealed Bernat´s Bayern exit - Hoeness|
|Keita set to miss out as Liverpool monitor injured stars|
|He didn´t want to be here – Guardiola doubts Sancho will return to Manchester City|
|Sarri: Manchester United are the best in the Premier League|
|Mourinho salutes ´brave´ Shaw for ´best possible´ response to criticism|
|No Ballon d´Or distractions for Griezmann, insists Simeone|
|Wigan stand by Hardaker as full-back prepares to undergo rehabilitation|
|Barcelona deny Neymar talk|
|Hazard can win the Ballon d´Or as a Chelsea player, insists Sarri|
|De Bruyne in contention to start in Manchester City´s clash with Burnley|
|Neymar needs to mature to reach Messi levels - Xavi|
|We have a hell of a lot to do - Paine slams Australia batting|
|Kerber and Osaka to meet at WTA Finals|
|Lorenzo out of Japanese MotoGP|
|Real Madrid handed Africa trip in Copa del Rey|
|Allegri: Ronaldo has sharpened Juventus focus|
|No Wade in Wasps squad amid NFL reports|
|Rooney: Five of us controlled Man United dressing room|
|Bayern bosses launch scathing attack on ´disrespectful´ media|
|Saints lock in Lawes to new deal|
|Adelaide United 1 Sydney 1: Debutant Le Fondre rescues a point|
|Madrid can´t look back, only forward - Lopetegui confident of revival|
|Wimbledon to introduce final-set tie-breaks|
|Abbas inspires Pakistan to series victory|
|Madrid boss Lopetegui hopeful on Bale availability|
|Mood is positive at Bayern, insists under-pressure Kovac|
|LeBron offers food for thought after losing Lakers debut|
|Bolt future not an immediate concern for Mariners|
|Hazard: I could finish my career at Chelsea|