Atletico Madrid and striker Diego Costa have parted ways for the second time after the La Liga leaders agreed to the player's request to rescind his contract on Tuesday.
An Atletico statement said Costa, 32, had asked to leave the club immediately for "personal reasons". His contract was to run out in June 2021.
"The striker asked to leave the club for personal reasons a few days ago and on Tuesday signed the termination of his contract," Atletico said.
"The club thanks Diego Costa for his dedication during these years and wishes him well in the next stage of his professional career."
Atletico coach Diego Simeone paid tribute to the striker who was so influential in the team's 2013-14 La Liga title run.
"We have spent a lot of time together over the years, he has given us a lot and we have given him a lot too," Simeone said.
"We spoke about his personal issues and the club wanted to help him without harming its own interests and we feel better now we have resolved the issue."
Costa helped Atletico to the Spanish title with 27 goals and they also reached the 2014 Champions League final but lost 4-1 to rivals Real Madrid in extra-time after Costa was forced off early with a hamstring injury.
He joined Chelsea in 2014 for €35 million ($42m) and was an instant hit, firing Chelsea to the 2014-15 and 2016-17 Premier League titles with 20 goals in each campaign.
He could hardly have had a more fitting second debut after returning to Atletico for a reported €57m, scoring and getting sent off in a 2-0 win over Getafe.
The Brazilian-born Spain striker scored the winner in a Europa League semi-final against Arsenal on their way to winning the competition in 2018 and in the UEFA Super Cup victory over Real, although his second spell was mostly disappointing.
Injuries limited him to 43 La Liga starts in three years, scoring 12 goals, and opportunities were further limited by the signings of Joao Felix and Luis Suarez.
Costa scored in Atletico's 3-1 win over Elche on December 19 and said he was looking forward to healthy competition with Suarez, only to ask to leave days later.
"He felt the need to find a new challenge, and I'm sure wherever he goes he will do well, because he's a fighter," added Simeone.
"We want to thank him, Diego has given us everything as a player and as a human."