Barcelona have announced they have reached an agreement to sell Bojan Krkic to Roma for €12million.
The Serie A outfit had already reached an agreement over personal terms with the 20-year-old last month.
The deal includes a buy-back option for Barcelona to bring the player back to Camp Nou in 2013 for €13million
A statement from Barcelona read: "The cost of the operation is 12million euros but includes a compulsory buy-out option to be exercised by Barcelona at the end of the 2012/13 campaign, at a cost of 13million euros.
"This buy-out option can be blocked by AS Roma but in that case, the total cost of the transfer would be 40million euros."
Bojan struggled to hold down a regular place in Barca's star-studded side last season and they are willing to let him move on.
The Spain international admitted he was happy to move to Roma and he was also pleased Barcelona included a buy-back option in the deal.
"My dream was to triumph with Barca, but I am very happy that another club has given me the chance to continue succeeding," said Bojan.
"I'm going from one big club to another and all parties have an interest. That makes me happy. I consider myself privileged."