Carlos Bacca stepped off the bench to give AC Milan all three points late on as they beat Sampdoria 1-0 at Stadio Luigi Ferraris on Friday night.
The Colombia international was dropped in favour of new signing Gianluca Lapadula, but he made an impact as a second-half substitute by scoring the winner with five minutes remaining.
La Samp will have felt aggrieved to have lost the match after they had two goals disallowed – one for offside and the other for handball.
The hosts created the better chances on the night and they went closest to finding the opener in the first half when Gianluca Lapadula lashed his shot over from inside the area on 29 minutes after being played in on goal by Giacomo Bonaventura.
Edgar Barreto threatened to break the deadlock just before half-time with a shot from inside the box that visiting keeper Gianluigi Donnarumma did well to keep out.
Marco Giampaolo's side had the ball in the back of the net on 70 minutes, only to have the goal ruled out for offside. It seemed a harsh call as Barreto looked onside when he tucked home after a corner had been diverted into his path.
Bacca had been introduced five minutes earlier, and the striker almost scored nine minutes after entering the field, but his strike was smartly saved by Emiliano Viviano following good work from M'Baye Niang to create the chance.
The closing stages of the match was end-to-end stuff as Luis Muriel struck the woodwork for the home team, before Bonaventura had a penalty appeal waved away after he went down under a challenge from Pedro Pereira.
La Samp then had a second goal chalked off when Muriel handled the ball in the build-up, resulting in a booking, although the incident looked accidental.
But Milan snatched all three points at the death as Bacca latched onto a fine pass from Suso and slotted past Viviano from inside the area.