Milan held off a late Salernitana fightback to make a winning start to 2023 as a 2-1 victory kept them in pursuit of Serie A leaders Napoli.
First-half goals from Rafael Leao and Sandro Tonali looked to have been more than enough for Stefano Pioli's side to begin the new year with a comfortable win.
But Federico Bonazzoli's late finish set up a nervy finale at Stadio Arechi, with the Rossoneri just about able to hold their nerve and secure the three points.
Having survived a relegation battle last season, Salernitana came close to a major scalp and Davide Nicola will take heart from their late rally against the Scudetto holders.
The visitors did not have to wait long for the opener, with Leao rounding Guillermo Ochoa in the 10th minute to slide in a low finish after latching onto Tonali's looped pass.
Tonali got in on the act himself only five minutes later, Brahim Diaz pouncing after Ochoa's save and nudging it back for the midfielder to power home.
A chance to make it a three-goal lead was scuffed shortly after the restart, when Olivier Giroud tapped a shot straight to the goalkeeper.
That miss looked like it might come back to haunt Milan when Salernitana found an unexpected response heading into the closing stages through Bonazzoli's close-range finish.
But the hosts were unable to find a second to force a result as the Rossoneri hung on to take a win crucial to their ambitions of defending their title.