Barcelona have agreed to let striker Luis Suarez join La Liga rivals Atletico Madrid.
Suarez is not wanted at Barca and the Catalans were happy to release him for free, provided he did not join certain other top clubs.
The Uruguayan agreed terms on a reduced salary with Atletico after a move to Juventus fell through because of passport issues.
Barcelona chairman Josep Maria Bartomeu then blocked the deal because he did not wish to sell to a Spanish rival.
But, after meeting with Suarez's representatives, the Catalan club have backed down, with the striker threatening to air his grievances to the media.
Atletico will have to pay a nominal fee of no more than 6m euros for the 33-year-old, which will be based on variables such as Champions League qualification.
Suarez will earn half of the 30m euros a year he was on at Barca.
The move ends Suarez's six-year spell with Barca, during which he scored 198 goals in 283 appearances and formed a feared front three with Lionel Messi and Neymar.
On Wednesday night, Barcelona released a statement thanking Suarez for his time at the club.
"FC Barcelona would like to publicly express their gratitude to Luis Suarez for his commitment and dedication and wishes him all the best for the future," the statement said.
The club said a "farewell event" would take place for Suarez at 11:30 BST on Thursday before a press conference.
Atletico said the deal had been agreed "subject to passing his medical and agreeing and formalising the Uruguayan's contract."
He joined the club for £74m from Liverpool in 2014 and helped them win four La Liga titles, four Copa del Reys and the Champions League and Club World Cup in 2015.
It also ends one of this summer's long-running transfer sagas, which looked likely to result in the player ending up in Turin - a move that was dashed, according to Juventus directors, because of the amount of time it would have taken to secure Suarez an Italian passport.
- Police probe Luis Suarez's Italian citizenship test
- Juventus re-sign Atletico Madrid striker Alvaro Morata on loan
Find all the latest football transfers on our dedicated page.
- Women's International T20: Watch highlights of England v West Indies
- Kitchen Starter Pack: Amazing recipes and food hacks that won't break the bank