Ibrahimovic has also played for Serie A sides Juventus and Inter Milan
Zlatan Ibrahimovic has passed his AC Milan medical to finalise his season-long loan from Barcelona.
Milan have the option to make the move permanent next summer for 24m euros (£19.7m) and the 28-year-old striker has agreed terms on a four-year deal.
"We have agreed a deal for a season's loan and then the right to buy," Milan said in a statement.
And Barcelona confirmed: "The deal was done thanks to the collaboration of the player and willingness of his agent."
After the medical, Ibrahimovic left AC Milan's training ground to join the Sweden squad for their upcoming Euro 2012 qualifiers.
Ibrahimovic is thought to have a £216m buy-out clause in his contract but Barcelona have agreed to sell him for substantially less than the 66m euros (£54m) he was valued at when he joined from Inter Milan in 2009 in a swap deal involving Samuel Eto'o, who moved in the opposite direction.
Despite scoring 21 goals in 41 games for Barca during the 2009-10 campaign, Ibrahimovic largely failed to show the form that saw him named Serie A footballer of the year in his last two seasons at Inter.
He will now return to Italy to play for Inter's arch rivals, following days of negotiations between Barca and AC Milan representatives.
Rossoneri vice-president Adriano Galliani said on Thursday that talks were "very complex, difficult and very expensive".
Ibrahimovic played the first 45 minutes of a friendly between Barcelona and Milan at the Nou Camp on Wednesday, which the Catalan giants won 3-1 on penalties.
Afterwards the former Ajax and Juventus man conceded his relationship with Barca coach Pep Guardiola was strained.
"I haven't spoken to Guardiola for six months," Ibrahimovic told Sky Italia.
"I do not know the reason for this but there are certainly problems.
"As for Milan, for now, I do not know anything about a possible move, so I will remain a Barcelona player but I would like to play alongside a player such as Ronaldinho."
When asked about Ibrahimovic's comments, Guardiola replied: "We have no problem of communication.
"For the good of the club it's best not to say anything. There's always a reason but I'm not going to explain it now. I'm very communicative.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.