Lucas Paqueta's first AC Milan strike and another Krzysztof Piatek goal helped Gennaro Gattuso's side to a 3-0 home win over Cagliari that moved the Rossoneri back up to fourth place in the Serie A table.
But a freak own goal from defender Luca Ceppitelli gave Milan an early lead and their advantage was swiftly doubled by Brazilian attacker Paqueta.
Piatek wrapped up the scoring after the break with his fourth Milan goal and Gianluigi Donnarumma marked his 150th Rossoneri appearance with some fine saves in a well-earned clean sheet that keeps his side's Champions League qualification hopes on track.
Milan had only won one of their past four home league games but they made a strong start, with Alessio Cragno making a smart stop to keep out Hakan Calhanoglu's powerful strike.
And Cragno was beaten in the 13th minute when his save from a Suso's shot deflected back into his own net off the arm of unfortunate Cagliari captain Ceppitelli.
Milan made it 2-0 in the 22nd minute as Paqueta scored his first goal for the club, arriving at the back post to send a controlled volley past Cragno from Davide Calabria's right-wing cross.
Donnarumma saved well from Joao Pedro before the break and the same combination resulted in a key moment on the hour.
Milan's goalkeeper parried Joao Pedro's effort and on the rebound the Cagliari striker hit the crossbar with a chip when he had to score.
That miss was soon punished as Piatek hit his 15th Serie A goal of the season, the in-form forward pouncing on the loose ball after Cragno rushed off his line to block Calhanoglu's shot.
What does it mean? Paqueta and Piatek boost Milan
The arrivals of Paqueta and Piatek have added attacking thrust to the Rossoneri at a time when they looked to be running out of steam with Gonzalo Higuain as their figurehead. Milan have only lost once since the middle of November in the league. Their momentum is growing again.
Donnarumma shines on landmark
Playing his 150th game for Milan despite being just 19, Donnarumma made a quite brilliant save low to his left to keep out Joao Pedro with his side 2-0 up. Piatek soon secured the points but had Donnarumma been beaten the door would have been open for a Cagliari comeback.
Joao Pedro tries to be too clever
Having been superbly denied by Donnarumma - who could only push the ball back out into the six-yard box - Joao Pedro should have tapped in the rebound. Instead, he tried to chip the Italy international and was left embarrassed as his overhit effort came back off the woodwork.
Milan are away to top-four rivals Atalanta on Saturday, the same day Cagliari host Parma.