Mario Balotelli's stunning long-range effort lit up a lacklustre Milan performance in a 1-0 home victory over Serie A strugglers Bologna.
Clarence Seedorf's charges had struggled to create clear-cut chances against a stubborn Bologna defence on Friday, but a moment of magic worthy of winning any game from Balotelli four minutes from time snatched all three points.
The Italy international collected the ball and found the top corner with a superb strike from fully 35 yards, leaving visiting keeper Gianluca Curci with no chance.
Milan dominated possession in the first half but just could not create any clear-cut chances, and they needed Christian Abbiati to prevent Rene Krhin's goalbound header to keep the scores level at the interval.
Bologna twice came close to breaking the deadlock with Jonathan Cristaldo's half-volley going narrowly wide before Abbiati's fine stop denied Lazaros Christodoulopoulos.
But it was Balotelli who delighted the home crowd after a below-par Milan performance, with his 10th league goal of season enough to lift them to ninth in the table, while 16th-placed Bologna remain four points above the drop zone.
The hosts looked to dictate the tempo in the early stages and fashioned the first chance in the fourth minute when captain Riccardo Montolivo's effort stung the palms of Curci.
Montolivo was involved again 10 minutes later with a sweetly struck half-volley from 25 yards that Curci could only parry into the path of Balotelli, who could only scuff the rebound into the ground.
Milan were struggling to turn possession into clear-cut chances, and were almost caught cold when Andrea Mantovani's teasing cross from the left was met by the head of Rene Krhin, with the former Inter midfielder forcing a fine diving stop from Abbiati.
Having survived that scare, Milan had an opportunity just after the half-hour mark when Curci spilled Balotelli's weak free-kick from the left touchline.
Cristian Zaccardo - who came in for Cristian Zapata, who got injured in the warm up - reacted quickest, but his effort was blocked with the defender adjudged offside anyway.
There was a delay to the second half as referee Mauro Bergonzi needed treatment on a cut lip sustained when the ball struck him in the face in the opening period.
When play resumed, Milan continued to see the majority of the ball without showing any cutting edge in the final third.
And their inability to force opportunities twice nearly cost them dear just after the hour mark.
First Cristaldo stretched to meet Gyorgy Garics' cross from deep on the half-volley and guided his shot just wide of the post, before Christodoulopoulos' shot on the turn from the edge of the box looked destined for the top corner before Abbiati flung himself to the left to keep the scores level.
But just when it looked like Milan would remain frustrated, Balotelli unleashed an unstoppable strike from the right to claim an unlikely win.
|Mourinho tells Ronaldo: Team honours come first|
|Khedira returns to Juve training|
|Celtic v Qarabag: Champions League return of utmost importance, says Collins|
|Pellegrini: Jovetic had to go|
|Manquillo completes Marseille move|
|Schalke reject Juve´s Draxler bid|
|Blanc: Di Maria deal ´close´|
|Di Santo debut ends in stalemate|
|Fire sign Drogba, trade him to Montreal Impact|
|FIFA and UEFA welcome ruling on third-party ownership|
|Juve kick off title defence against Udinese|
|Stoke sign free agent Afellay|
|Benitez confident Ramos will stay|
|Fenerbahce issue warning to fans|
|UEFA Champions League Preview: De Boer confident Ajax are ready for Vienna test|
|Bility: I am the favourite for FIFA presidency|
|Pienaar to miss start of season|
|Vietnam 1 Manchester City 8: Sterling shines as tourists run riot|
|All-Star Keane relishing Spurs clash|
|Shaun Wright-Phillips joins brother Bradley at Red Bulls|
|Inter 0 Real Madrid 3: Rodriguez stunner caps comfortable win|
|Villa sign Ayew|
|Watford complete Berghuis transfer|
|Robben returns to Bayern training|
|Pulis anxious to make West Brom additions|
|David Luiz eager to welcome ´fantastic´ Di Maria|
|Fernando injury free ahead of new campaign|
|Hummels blames weight issues for poor season|
|Defoe hoping for early Sunderland goals|
|Depay hints at identity of ´surprise´ United striker|
|Tigres UANL v River Plate: Hosts look to bounce back and make history|
|Crespo set for Villa move|
|Terry: I would never join a Premier League rival|
|Van Gaal coy on United future|
|Romero to cover potential De Gea exit - Van Gaal|
|Uruguay win men´s football gold at Pan Am Games|
|Pirlo thanks New York City fans for ´beautiful´ welcome|
|Mexico capitalised on ´the mistakes we made´ - Schafer|
|Herrera delighted with Mexico display|
|MLS Review: Whitecaps build happy home, Pirlo debuts|
|Guardado wins Golden Ball at Gold Cup|
|NZF confirms Olympics disqualification appeal|
|Jamaica 1 Mexico 3: CONCACAF giants complete form turnaround|
|New York Red Bulls 2 Benfica 1: Another scalp for MLS side|
|Romero signs with United|
|Moghreb Tetouan 1 Al Hilal Omdurman 1: Visitors go top|
|Van Gaal rules out Ronaldo bid|
|Pique open to Barca captaincy|
|Pirlo makes MLS bow in thrilling NYC victory|
|Coutinho and Can return for Liverpool U21s|
|Walcott deal ´closer´, says Wenger|
|Arsenal 1 Wolfsburg 0: Walcott the match-winner in Emirates Cup finale|
|Di Santo links up with Schalke squad|
|Lukaku treble sinks Hearts|
|Benitez again refutes Ronaldo rift rumours|
|Pepe sure Ramos will stay at Real|
|City target De Bruyne named Germany´s Player of the Year|
|Montero spoils McCarthy´s Palace debut|
|Lyon 0 Villarreal 2: Soriano, Baptistao seal comfortable win in Emirates Cup|
|Wijnaldum on target as Newcastle are held|
|Mourinho: Rivals trying to buy the title|
|Jovetic set for Inter medical|
|RFS in ´denial´ over racism issue, claims Football Against Racism in Europe|
|Salah not staying at Chelsea - Mourinho|
|Mbemba closes in on Newcastle switch|
|Ibrahimovic: Di Maria will take PSG to another level|
|Delph: Don´t compare me to Pogba|
|Dundee United sign Sneijder|
|Morata relishing new-look Juve strikeforce|
|Strachan "not scared" of England after World Cup qualifying draw|
|Brazil claim football, basketball, handball gold in Toronto|
|Lampard´s debut delayed again, Pirlo ready to play|
|Mourinho open to Premier League matches in US|
|MLS Review: Texas unites to hurt Galaxy|
|Luis Enrique: United can emulate Barca revival|
|Van Gaal singles out Januzaj, hails United´s forwards|
|Blanc still hopeful PSG will sign Di Maria|
|Irish international Cunningham seeks Bristol City exit|
|Italy embracing Spain challenge in World Cup qualifying|
|Dos Santos brothers in doubt for Gold Cup final|
|PSG 1 Chelsea 1 (aet, 5-6 on penalties): Courtois clinches victory for Mourinho´s men|
|United States 1 Panama 1 (aet, 2-3 on penalties): Mejia denies hosts third|
|ES Setif 1 Al Merreikh 1: Sudanese deny title-holders at home|
|CONCACAF admit referee errors in Gold Cup semi-final|
|Dutch favourites in Group A - Deschamps|
|Barcelona 1 Manchester United 3: Rooney, Lingard and Januzaj maintain winning start|