Mario Balotelli has completed his much-hyped move from Manchester City to AC Milan.
Both clubs have confirmed the Italy striker has concluded the formalities of the reported £19million switch and signed a four-and-a-half year contract.
The deal brings to an end an extraordinary spell at City in which Balotelli attracted as many headlines for off-field controversies as for his performances on it.
The 22-year-old, who has already been pictured in Rossoneri colours after a chaotic arrival back in his homeland, will officially be presented as a Milan player on Friday evening.
Balotelli missed City's game at QPR on Tuesday after a price was agreed with Milan which, rising to £22million, leaves the English champions just short of the £24million they paid Inter Milan for him in 2010.
The news sparked huge interest in Italy and Balotelli was swamped by reporters, photographers and fans as he arrived at a clinic in Milan to undergo his medical on Wednesday.
There were also reports of police being called to disperse unruly crowds outside a restaurant where he met club officials.
Balotelli returned to the club's offices on Thursday morning to formally sign the deal.
A statement read: "AC Milan announces that it has acquired from Manchester City Mario Balotelli, who has signed a contract until June 30, 2017."
Balotelli made a huge impression at City - not always for footballing reasons - but he played key roles in the FA Cup win of 2011 and last year's title success.
He told City's website, www.mcfc.co.uk: "For sure I will remember my brilliant team-mates, the manager and all the supporters.
"They are the best, they were great with me and I will always have a very special place in my heart for City, it's a great club with a great future.
"I thank them for all of their support of me. Maybe one day we will see each other again."
Balotelli had been linked with Milan throughout the month but City continually played down the prospect of him leaving.
But with senior figures at Milan continuing to discuss the possibility of a deal, rumours of his departure continued.
Eventually, Milan's interest proved tempting for all parties.
Balotelli paid tribute to City manager Roberto Mancini as he left.
Mancini was often heavily critical of his fellow Italian but, ultimately, was fiercely loyal and forgave him for many of his indiscretions.
Balotelli said: "Yes, I said goodbye to everyone at the meal in London before the game at QPR. It was very emotional for me.
"I spoke with Roberto before I went to speak to the players.
"We spoke for some time about lots of things. He was sad, and I was too.
"But it was a good conversation. I love Roberto, he has been very important for my career, and I will always thank him for having trust and faith in me.
"Being at City was an important part of my life and career. I needed to grow up like a player and as a person and it has been a very good experience for me."
Balotelli scored 30 goals in 80 appearances for City and his contribution to their success was not insignificant, but he will be equally well remembered for four red cards, clashes with team-mates, brushes with discipline and other misdemeanours.
He never regained a starting place after a dismal performance in the derby defeat by Manchester United on December 9 through a combination of illness and selection issues.
There then followed a high-profile challenge to a club fine for indiscipline, which he later dropped, and a much-publicised training-ground fight with Mancini.
Mancini promised to give the player "another 100 chances" after that but less than four weeks later his time at the club has come to an end.
Balotelli said: "I will always be interested in Manchester City and their fortunes.
"I really hope that City can win the league again this year and beat United.
"I think there are great players at the club and a great manager too.
"The club will be very successful in the future and that makes me happy."
Mario Balotelli factfile:
1990: Born August 12 in Palermo to Ghanaian immigrants.
1993: Adopted by an Italian couple, taking the name Balotelli.
2005: Makes debut for Lumezzane in a Serie C1 league match against Padova. Youngest player to appear in Serie C at 15 years and 289 days.
2006: Signs for Inter Milan.
2007: August - Called up by Ghana coach Claude Le Roy for friendly against Senegal, but declines the offer, citing his wish to play for Italy.
December - Makes Inter debut in Serie A against Cagliari and three days later scores in first start for Inter in a 4-1 victory over Reggina in the Coppa Italia.
2008: April - Makes first Serie A start for the Nerazzurri, scoring one and setting the other up in a 2-0 win over Atalanta. Ends season with three goals in 11 appearances as Inter win league title.
September - Scores on Italy Under-21 debut in a European Under-21 Championship qualifier against Greece.
November - Becomes youngest Inter goalscorer in the Champions League, netting against Anorthosis Famagusta. Balotelli is dropped from the squad with coach Jose Mourinho citing a poor attitude.
2009: January - Mourinho drops Balotelli for the second half of January, questioning his commitment in training.
2010: March - Apologises after being pictured wearing an AC Milan shirt.
April - Throws Inter shirt to the ground after Champions League semi-final first-leg win over Barcelona. Brandished a "child" by Inter star Dejan Stankovic and dropped for a number of games.
May - Inter retain Serie A title and Balotelli is an unused substitute as Inter beat Bayern Munich to win Champions League.
August - Manchester City sign Balotelli on a five-year deal for an undisclosed fee.
November - Scores first two Premier League goals in a 2-0 win at West Brom but is also dismissed for a tangle with Youssouf Mulumbu.
December - City boss Roberto Mancini says Balotelli must change his attitude following his claims he had never heard of Jack Wilshere after beating the Arsenal midfielder to FIFA's young player of the year award. Scores a hat-trick against Aston Villa six days later.
2011: March - It emerges he threw a dart at a City youth team player. No-one was hurt and Balotelli escapes punishment.
Balotelli apologises to team-mates after being sent off during a Europa League tie with Dynamo Kiev for a challenge described by Mancini as "stupid".
July - Substituted by an enraged Mancini after performing a pirouette and backheeling wide when clean through on goal in a pre-season friendly against the Los Angeles Galaxy.
October - Emergency services are called after a firework is set off in his home bathroom, triggering a fire. He scores in the Manchester derby and celebrates by revealing a T-shirt which reads: "Why always me?"
November - Third red card of Balotelli's City career arrives courtesy of two yellows in a league match against Liverpool.
January - Converts a late penalty to give City a 3-2 win over Tottenham, minutes after appearing to stamp on the head of Scott Parker. Charged with violent conduct by the Football Association.
January 25 - Balotelli and City accept a four-match ban for the incident.
March 27 - Gatecrashes the press conference to announce the arrival of Andrea Stramaccioni as Inter's new coach.
April 8 - Shown a fourth red card for City, seeing red for two bookable challenges on Bacary Sagna in a 1-0 defeat at Arsenal. He was also guilty of a shocking knee-high challenge on Alex Song.
May 13 - Provides the assist for Sergio Aguero's last minute winner in the 3-2 win at QPR that sees City win the league title on the final day of the season.
May 29 - Named in Italy squad for Euro 2012 by coach Cesare Prandelli.June 28 - Produces a man of the match performance against Germany in the semi-final of Euro 2012 by scoring two goals to see them into the final.
July - Starts in the Euro 2012 final as Italy lose 4-0 to Spain. Balotelli leaves the pitch in tears at the final whistle and clashes with senior figures within the Italy camp before returning to collect his medal.
December 17 - Announces intention to take City to tribunal after being fined two weeks wages for on-field discipline. However, he soon accepts the punishment and drops the case.
2013: January 3 - Is pictured having a training ground bust-up with Mancini, but is immediately backed by his boss who says he will give the striker "100 more chances".
January 29 - It is announced that City have agreed a deal with Milan for the sale of Balotelli, who had scored just three goals in 20 appearances all season.
January 30 - Travels to Italy to discuss personal terms ahead of a return to Milan.
January 31 - Both teams confirm the transfer for an undisclosed fee has been completed, with Balotelli signing a four-and-a-half-year deal with the Italian club.