Giampaolo Pazzini and Mario Balotelli scored in the last five minutes as Milan clinched a 2-1 come-from-behind win at Cagliari on Sunday.
Cagliari looked on course for their first victory against Milan since 1998 after Marco Sau's clever finish in the 28th minute.
Milan missed a host of chances to equalise but with three minutes left, Balotelli again stepped up for new manager Clarence Seedorf, curling in an excellent free-kick.
The former Manchester City striker scored the winner in Seedorf's first match in charge – a 1-0 Serie A win against Verona – while he also netted in a 2-1 Coppa Italia quarter-final loss to Udinese on Wednesday.
And Pazzini – introduced as a substitute for Robinho on the hour-mark – hooked in Keisuke Honda's corner in the 89th minute, as his first league goal of the season gave Milan three precious points.
The late goals gave Milan their first back-to-back Serie A wins of the season, as Cagliari's winless run stretched to six matches.
With Christian Abbiati and Andrea Poli the latest Milan players to be struck down by the flu, want-away goalkeeper Marco Amelia made his first appearance of the season.
Cagliari were boosted by Friday's news that striker Mauricio Pinilla had his two-match suspension halved on appeal, allowing him to start, but Colombia forward Victor Ibarbo was still banned.
Amelia made a shaky start, with a miskick leading to an early Cagliari chance, but Andrea Cossu's heavy first touch robbed him of a shot on goal, while Robinho curled wide at the other end.
Cagliari then took the lead, against the run of play, after another shoddy Amelia clearance fell to Pinilla.
The Chilean picked out Sau with a chipped ball, and he took it down on his chest before showing excellent composure to wrong-foot Daniele Bonera and calmly slot the game's first goal.
Honda headed at Avramov following an excellent Mattia De Sciglio cross as Milan looked to respond, but their sluggishness at the back was highlighted by Bonera completely missing the ball, allowing Pinilla a shot on goal just before half-time.
Milan improved after the break, as Riccardo Montolivo shot wide just two minutes after the resumption, while Balotelli and Honda shot over, the latter after a clever one-two with Robinho.
But despite their continued chances, Milan could not take advantage, and they were nearly made to pay when Pinilla tried his luck with an angled drive from 18 yards that narrowly missed the top-left corner.
Kaka had a goalbound-header cleared by Davide Astori, but Balotelli's delightful set-piece, after Cagliari substitute Matias Cabrera's deliberate handball, set up a tense finish.
And Pazzini produced the goods for Milan, flicking a late corner into the back of the net to delight his new boss.
|Coach: D. López|
for M. Sau 69'
for A. Ekdal 76'
for D. Dessena 90'
|MLS Review: Wright-Phillips double inspires Red Bulls to New York derby rout|
|James seeks more game time at Madrid|
|Rooney: I want to be a manager|
|Mignolet welcomes Karius challenge in Liverpool number one battle|
|Batshuayi buoyed by winning vibes at Chelsea|
|Moyes and Sunderland players diverted after plane fault|
|´Loved´ Varane targets long Madrid stay|
|Kostic set for Hamburg medical|
|Leicester crying over Kante sale - Ranieri|
|Schurrle the perfect Mkhitaryan replacement - Tuchel|
|West Ham face anxious wait on Cresswell injury|
|Mourinho will accept criticism from United legends|
|Bertolacci desperate for fresh start after underwhelming first season at Milan|
|Hoops hand Toure one-year deal|
|Origi ready to fight for Liverpool spot|
|Emery wants PSG stay for ´fantastic´ Matuidi|
|No Barcelona offer for Vietto - Cerezo|
|Burnley apologise for racist abuse from supporter|
|Guardiola will not rush Kompany comeback|
|Of course I´ll shake Guardiola´s hand, snaps riled Mourinho|
|Watzke: No more signings for Dortmund|
|Roma expect Manolas to snub Premier League move|
|Adriano set to leave Barcelona for Besiktas|
|Manchester United in worst possible situation - Mourinho|
|Sporting would have to sell stadium to afford Van Persie - Jesus|
|Jonas´ agent confirms Barcelona approach|
|No problem with Mourinho, insists Guardiola ahead of derby in China|
|Toronto´s hat-trick hero Giovinco: I´m back|
|Drogba revels in ´special night´, dedicates hat-trick to family|
|MLS Review: Hat-tricks for Drogba and Giovinco as stars shine|
|Whelan backs Liverpool for top-four finish|
|Pellegrini still waiting for right offer|
|Ronaldo deserves to win Ballon d´Or - Vazquez|
|Phelan wants Hull job|
|Alaba saddened by Gotze exit|
|Morgan: Vardy right to re-sign|
|Maradona ´hurting´ as Higuain closes on Juventus move|
|Moyes watches Sunderland win, Ibe opens account in six-goal Bournemouth thriller|
|Messi cuts short holiday for Barcelona training camp|
|Ranieri still confident of keeping Mahrez|
|Toure to complete Celtic move on Sunday, says Rodgers|
|Vietto sends Simeone a reminder amid Barcelona links|
|Celtic 1 Leicester City 1 (5-6 on penalties): Mahrez magic the highlight as Ranieri´s side triumph i|
|Ribery, Alaba on target in Bayern win|
|Neymar hails Micale ahead of Olympic tilt|
|Ronaldo wants Real Madrid renewal|
|Ochoa joins Granada from Malaga|
|Heidel quashes Meyer to Liverpool as ´nonsense´|
|Scholes challenges Allardyce to change England mentality|
|Tenerife star Crosas investigated for killing endangered shark|
|De Gea: Manchester United can win title under Mourinho|
|Marseille replace Batshuayi with brother Leya Iseka|
|Cristiano Ronaldo: Best season of my career|
|Scholes: Pogba is not worth £100million|
|Gotze has not forgotten how to play football - Riedle|
|Delph learning more than ever under Guardiola|
|Jovetic ´not worried´ about Juventus|
|Allardyce wants Euro 2016 woes to fire his England|
|Giggs not in a rush to take manager´s job|
|Lopetegui: If not for Spain I would be Wolves boss|
|Shaw one of best left-backs in world - Herrera|
|Injured Sanchez to miss Arsenal tour|
|Melbourne Victory 1 Juventus 1 (Melbourne win 4-3 on pens): Thomas inspires Victory as Juve pay pena|
|Janssen: Ajax and PSV were never going to pay as much as Tottenham|
|Bayern to make Munich shooting tributes|
|Wenger wishes luck to old foe Allardyce|
|United defender Varela joins Frankfurt on loan|
|Sunderland appoint Moyes as Allardyce replacement|
|Javi Martinez devastated by Munich shootings|
|Rooney: I´m desperate to play for Mourinho, just like under Ferguson|
|Godin: Champions League the dream, but LaLiga the focus|
|Klopp hails Wijnaldum´s ´football smartness´|
|Klavan ready to fight for starting spot after completing ´dream´ Liverpool move|
|Real Salt Lake 1 San Jose Earthquakes 1: Mulholland salvages point|
|Madeira airport to be named after Cristiano Ronaldo|
|Villar, Ceferin and Van Praag announce UEFA presidential bid|
|Witsel has offers from England and Italy|
|Tuchel will bring out Gotze´s best - Watzke|
|Swansea confirm interest in Liverpool´s Allen|
|Arsenal´s Coquelin: LeBron v Curry is like Messi v Ronaldo|
|Rooney backs Allardyce appointment|
|Bayern and Ancelotti respond to Munich attacks|
|West Brom friendly cancelled over violence concerns|