(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.