Barcelona have confirmed that they have agreed a deal to sell David Villa to Atletico Madrid.
Reports surfaced of the deal earlier today, although neither club had officially confirmed the rumours.
However, Barcelona have now revealed that the two clubs have agreed a deal in principle for the 31-year-old and also outlined the financial details of the transfer.
"Barca and the Madrid club have reached an agreement in principle for the transfer of the Asturian player," read a statement on the club's official website.
"The deal will cost a maximum of €5.1m (£4.3m), with €2.1m (£1.8m) this season, €2m (£1.7m) more if the player is still at Atletico Madrid in the 2014-15 season and another €1m (£800k) if he stays until the 2015-16 season.
"As well as that, Barca have reserved 50% of the rights of any future transfer of the player."
Atletico also confirmed that they have agreed to sign Spain's record goalscorer subject to a medical.
"Atletico Madrid and Barcelona have reached an agreement in principle for the transfer of striker David Villa," read a statement on their official website.
"This agreement will be consolidated once the Asturian player undertakes his medical and signs his contract with our club."
Villa scored 48 goals in 116 matches for Barcelona having joined from Valencia for around £34m in 2010.