(CNN)Atlético Madrid and Diego Costa have agreed to an early end of the 32-year-old striker's contract, the Spanish club said on Tuesday.
"The striker, who asked to leave the club for personal reasons, signed the termination of his contract that ran until June 30, 2021," said Atlético on its website.
Costa played 215 matches and scored 83 goals for Atlético, helping the club win the La Liga title (2014), the Spanish Cup (2013), the Europa League (2018) and two UEFA Super Cups (2010 and 2018), according to the Spanish team.
The Brazilian-born Costa also played for Chelsea between 2014 and 2017, winning two Premier League titles with the London club, before returning to the Madrid team.
Atlético is top of La Liga -- on goal difference from champion Real Madrid -- but Costa has played just seven times this season and last started a game on October 17.
As well as leading La Liga, Atlético is in the last 16 of the Champions League and faces Chelsea in a two-legged tie on February 23 and March 17.
"The club thanks Diego Costa for his dedication during these years and wishes him well in the next stage of his professional career," said the Atlético statement.
In March, as the world grappled with the spread of the coronavirus, Atlético condemned Costa for coughing on reporters after the Spanish club's Champions League win over Liverpool.
In a video circulating on social media, Costa could be seen laughing and aiming coughs in the direction of reporters gathered in Anfield's mixed zone.
"It's a pity that some people find it difficult to understand the significance of this crisis. The player has repented and apologized when he realized his mistake," Atletico told CNN in a statement.