Forward Ante Rebic broke his AC Milan duck by scoring two second-half goals including a stoppage-time winner to give them a thrilling 3-2 win over Udinese in Serie A on Sunday.
After gifting Udinese an early goal with a mistake by goalkeeper Gianluigi Donnarumma, Milan turned the game around with goals by Rebic and Theo Hernandez and were stunned by an 85th-minute equaliser from Kevin Lasagna before snatching three points at the death.
The win lifted them to eighth in Serie A and they have not lost in four games in all competitions since 38-year-old striker Zlatan Ibrahimovic returned for a second stint at club at the start of the month.
"Ibra's arrival has given us that something extra," coach Stefano Pioli said. "We are playing with more conviction. We know we can score and win matches."
"I'm really happy for my players because we worked well earlier in the season but didn't reap what we sowed".
Milan made a terrible start as they went behind after six minutes. Goalkeeper Donnarumma rushed out of his area and collided with Udinese's Lasagna, leaving Jens Stryger Larsen to score into an empty net.
Rebic came on at half-time and levelled from close range within three minutes, his first goal since joining on loan from Eintracht Frankfurt at the start of the season.
Donnarumma made amends for his mistake with saves from Rolando Mandragora and Stefano Okaka before Hernandez rifled Milan in front from outside the area, meeting the ball first time after a clearance was headed straight to him.
Ibrahimovic fired over from Rafael Leao's pass before Lasagna silenced the San Siro by heading Udinese level in the 85th minute.
But Rebic had the final word when he collected a loose ball on the edge of the area and threaded his shot through a pack of defenders and into the bottom corner.