Atletico Madrid have reached a deal with Chelsea to sign striker Diego Costa.
The Spain international will travel to Madrid in the coming days to undertake a medical and finalise personal terms.
The 28-year-old will reportedly cost a fee that could rise to €60million, depending on bonuses.
Costa will complete his move in January, when the transfer window reopens and Atletico's ban on signing new players comes to an end.
"Atletico Madrid and Chelsea have reached an agreement in principle for the transfer of Diego Costa," an Atletico statement confirmed.
"The agreement is subject to the signing of a contract between the club and the Spain international.
"The English club have granted permission to Diego Costa to travel to Madrid in the coming days in order to pass medical tests and to finalise his contract."
Chelsea also confirmed the news in a brief statement via their official website.
The news means the end is in sight for one of the more protracted transfer sagas of 2017, which began with rumours of a possible exit as early as January.
Costa then claimed in June that Chelsea boss Antonio Conte had told him via a text message that he was free to leave the club, despite having scored 20 goals to help them to a second Premier League title in three seasons.
Atletico have long been favourites to sign back the forward they sold to Chelsea in 2014 but a move during the most recent transfer window became impossible when the club failed to have a transfer ban - imposed by FIFA as punishment for irregularities in the recruitment of minors - overturned.
Costa has been in Brazil since July and has refused to return to Chelsea training, accusing the club of treating him "like a criminal".
Conte laughed off the comments and said he would not pick the striker even if he made himself available, having signed Alvaro Morata from Real Madrid to become his first-choice forward.
22 de julio 2018
|Vettel will not lose any sleep after Hockenheim mistake|
|I manifested my dream – Hamilton revels in Hockenheim win|
|Pakistan seal crushing series sweep of Zimbabwe|
|Furious Ozil accuses German media of turning country against him|
|Woods makes his move as Spieth and Schauffele wobble|
|Vettel crash sees Hamilton retake championship lead|
|RFEF confirms one-legged Supercopa de Espana in Tangier|
|Fognini downs Gasquet to clinch Swedish Open|
|Spieth and Tiger underway as Kisner falls back|
|Iniesta, Torres suffer defeats in their J.League debuts|
|Cornet ends title drought in Gstaad|
|Martial ´very focused´ at Manchester United - Herrera|
|Root, Williamson and Bairstow - hat-trick hero Clark flourishes in Roses battle|
|Sri Lanka spinning towards crushing series whitewash|
|Ozil explains controversial Erdogan meeting|
|It´ll be hard for Tuchel to get our players – Kovac expects Boateng stay|
|Fakhar Zaman fastest to 1,000 ODI runs|
|Neymar happy for World Cup winner Mbappe|
|I was born ready! - Bellew accepts Usyk challenge|
|Tuchel seeks Rabiot answers as Barca rumours persist|
|In-form Storm go top, Rampant Roosters thrash Manly|
|Bancroft discharged from hospital after taking blow to throat|
|MLS Review: Martinez breaks record as Atlanta march on|
|Brewers top Dodgers to snap seven-game losing streak|
|Munguia wins after 12-round marathon with Smith|
|Hart ready to leave City to revive career|
|Puel shuts down Schmeichel transfer speculation|
|Four-way tie at Barbasol Championship as Lincicombe misses cut|
|Lenglet happy not to face Messi|
|Tuchel keen to get PSG stars back after friendly defeat|
|Pulisic signing would interest Klopp|
|Whatever b******t you say, no one forgets – Klopp defends spending comments|
|Usyk outclasses Gassiev to make cruiserweight history|
|Pella books Cecchinato meeting in Umag, Ramanathan´s Newport run continues|
21 de julio 2018
|Kisner expects nothing but exchange of ´horror stories´ with housemate Spieth|
|Inter new boy Lautaro Martinez denies Zenit in six-goal thriller|
|McIlroy eyeing early gains to apply scoreboard pressure|
|The Open 2018 diary: Spieth´s close shave|
|Salah is fully recovered and full of joy – Klopp|
|De Laurentiis accuses Sarri of trying to sign whole Napoli team|
|Lewis Hamilton explains German GP woes|
|O´Driscoll hails ´Test match animal´ Warburton|
|Spieth relishing prospect of Tiger tussle at Carnoustie|
|Sanches pushing for Bayern second chance - Kovac|
|Put on the Sunday red and enjoy Tiger´s ride regardless of Carnoustie outcome|
|Flawless Spieth takes share of Open lead after Tiger winds back the years|
|PSG´s Tuchel to be patient with World Cup stars Neymar, Mbappe & Cavani|
|Sanchez joins United tour in LA after visa issues|
|Catalans crush Salford to confirm Super League safety|
|Hamilton not giving up despite Hockenheim heartbreak|
|Spieth surges into Open Championship lead|
|Dumoulin is our biggest threat – Froome|
|Sane: Low gave me good reasons for World Cup snub|
|Tiger Woods in the hunt and loving it at The Open|
|Vettel delighted with German GP pole performance|
|Deschamps lauds intelligence of ´extraordinary´ Mbappe|
|Thomas maintains advantage as Fraile powers to stage victory|
|Woods sets clubhouse target, Kisner edges back in front|
|Bayern Munich 3 Paris Saint-Germain 1: Sanches strikes in ICC clash|
|Dost re-signs with Sporting CP after initially rescinding contract|
|Impressive Lions see off Jaguares to seal Waratahs semi|
|I´ll show Mourinho I´m ready, says United´s Pereira|
|Fognini sets up final clash with Gasquet|
|Injury ends Bouchard´s Swiss hopes, Sevastova through in Bucharest|
|That didn´t Work-u...race leader pulls up short of 3000metre finish|
|Prowling Tiger Woods on Open charge as Spieth joins leaders|
|Federer will struggle away from Wimbledon - Henman|
|Hamilton expecting tough Sunday at Hockenheim|
|Spalletti expects Icardi, Perisic to stay at Inter|
|Vettel smashes lap record to take Hockenheim pole after Hamilton woe|