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.
|United can challenge City for Premier League title, says Rooney|
|MLB All-Star 2018: Seven things you missed at Midsummer Classic|
|American League win home run-filled MLB All-Star game|
|Dragons lure Sims from Broncos|
|Cassano: Ronaldo like Nadal, Messi like Federer|
|Lakers´ Ball undergoes successful knee surgery|
|´We kill them, Messi or no Messi´ - Pogba´s pre-Argentina World Cup speech revealed|
|Cardinals suspend GM Keim for five weeks after DUI|
|Dalic: I can coach Brazil or Barca but Croatia my favourite|
|Warriors coach Kerr extends contract|
|I´m ready to bust him up - Miller calls out Joshua after New York confrontation|
|CAF Champions League Review: ES Tunis and TP Mazembe set the pace|
|Mixed day for seeds in Newport as Muller progresses|
|Rams sign Cooks to five-year extension|
|Cowboys’ Randy Gregory reinstated by NFL|
|Verdasco survives Swedish Open scare as Paire is picked off in Umag|
|US Open announces record prize fund for 2018|
|Stosur wins battle of former grand slam champions in Gstaad|
|Emery is Arsenal´s best signing, says Pires|
|Brewster commits to Liverpool with long-term deal|
|Panama boss Gomez steps down after World Cup|
|No Chelsea agreement for Golovin, claims CSKA president|
|Root looks right at home as England ease to series victory|
|Brighton sign Mali midfielder Bissouma from Lille|
|Kaka backs Brazil boss Tite after ´excellent´ World Cup|
|Alaphilippe the toast in France as Van Avermaet increases Tour lead|
|Shkupi 0 Rangers 0: Gerrard´s men advance despite dour draw|
|Khazri ends Sunderland nightmare as Saint Etienne swoop|
|The Open 2018 diary: Rose lets Rio go as Rahm goes ´Lefty´|
|Lampard raids Chelsea and Liverpool in Derby double swoop|
|Balotelli returns to Nice training after Marseille talks stall|
|Owens wants to play in the CFL, says agent|
|I don´t like thinking too much - Johnson|
|Toulon president fined as French club receive suspended points penalty|
|Top of the flops - Mickelson plays exquisite trick shot over man´s head!|
|Kerber targeted Wimbledon after 2017 disappointment|
|England´s World Cup heroes given dedicated parking spots|
|Insigne prefers Messi to new Juve star Ronaldo|
|Koepka enjoys playing with a chip on the shoulder|
|Ryan Hall to leave Leeds Rhinos amid reports of NRL move|
|Hamann slams Lahm for Low criticism|
|Hart named in Manchester City squad for United States tour|
|F1 Raceweek: Leader Vettel heads home|
|Unfair to pin Brazil blame on Neymar, says Kaka|
|Thomas and friends ´want to beat each other´s brains in´|
|Woods´ love for links fathered at Carnoustie|
|Confident Rose targets tournament wins and number one spot|
|Hallgrimsson leaves Iceland post|
|Australian Open to consult players over fifth-set tie-breaks|
|Daley´s coming home - Ajax rewrite Three Lions anthem|
|Woods: Open my best chance at winning another major|
|Blind completes Ajax return from Manchester United|
|I belong at the top, says Anderson|
|Leaving Madrid was my biggest regret, Panucci warns Ronaldo|
|Folau in no rush to settle future amid Reds rumours|
|Degenkolb: I need two or three secretaries to manage congratulations!|
|Harrington v Garcia: When winning makes life tougher|
|Mafi and Timani fined by Rebels|
|Watson: Johnson and Woods can prosper at Carnoustie|
|Alderweireld hints at Tottenham departure|
|Maradona takes over as Dynamo Brest chairman|
|The Open 2018: Wounded animal Spieth is a danger to Carnoustie rivals|
|Wests´ Reynolds to miss the rest of 2018|
|Pussy Riot members jailed for World Cup final protest|
|Ronaldo capture boosts Serie A - Mourinho|
|Goals at three World Cups and 50 for the Socceroos – Cahill´s international career in numbers|
|Giroud: It´s coming home|
|Harper wins Home Run Derby in Nationals Park|
|Brighton sign Button from Fulham|
|Bolt set to trial with A-League club Central Coast Mariners|