Ibrahimovic moved to Barca from Milan's city rivals Inter in a deal worth 66million last summer, with Cameroon striker Samuel Eto'o, who was valued at 20million euros, moving in the opposite direction.

However, Ibrahimovic's spell in Spain has lasted just one season with Milan ending days of speculation by finalising a complex agreement for the former Ajax and Juventus forward this evening, subject to a medical.

A statement on the Barcelona website read: "FC Barcelona and AC Milan have agreed a deal for Zlatan Ibrahimovic to move to the Italian club on loan for the 2010/11 season with the Rossoneri paying all his earnings.

"The agreement includes an option to buy for AC Milan, which they will exercise at the end of the season, for a value of 24million euros."

An AC Milan statement added: "The Swedish champion will undergo a medical on Monday morning after which he will sign a contract that will link him to the Rossoneri club for four years."

Ibrahimovic, who was under contract with Barca until June 2014, had a mixed time during his spell in Spain.

He scored 21 goals for the Catalan giants and helped the club retain their Primera Division title as well as winning the Club World Cup, two Spanish Super Cups and the European Super Cup.

However, he came in for criticism during the campaign and found himself the centre of transfer talk this summer following Barca's big-money purchase of prolific Valencia hitman David Villa.

There also appeared to be a strained relationship between Ibrahimovic and Barca coach Pep Guardiola, who the Swede claimed he had barely spoken to in the last six months.

Ibrahimovic, whose final appearance for Barca coincidentally came against Milan in the Joan Gamper Trophy on Wednesday night, is now looking forward to starting a new chapter in his career, though.

He is especially excited about the prospect of linking up with Alexandre Pato and Ronaldinho in a mouth-watering Milan forward line.

"I'm delighted. Everything has been resolved in the best possible way even though the situation was not easy," he told Sky Italia.

"Now I return to Milan with a different team than Inter and life goes on.

"Milan are one of the strongest clubs in the world, for the team and the tradition it has.

"With Pato and Ronaldinho, we have a fantastic attack. Now it depends on us. I think Milan fans will have fun watching the three of us play at the stadium."

Reflecting on what the reaction of his former fans at treble-winners Inter might be, Ibrahimovic added: "Inter's fans? I don't think they will be thinking of me considering they won everything last season.

"The situation that was created at Barcelona has given me a lot of adrenaline and now my dream is to win everything with Milan."