Luka Jovic made the difference for AC Milan one minute after coming on as an 80th-minute substitute with the winning strike in their 3-2 Serie A victory at Frosinone.
Olivier Giroud nodded in the opener which was cancelled out before the break by Matias Soule’s penalty, but Luca Mazzitelli fired the hosts in front after half-time.
The sides were back on level terms when Matteo Gabbia, assisted by Giroud, found the back of the net with a diving header before Serbia striker Jovic wrapped up the win.
The result sees AC Milan – in third – move to within four points of second-placed Juventus, having played one more game, while Serie A leaders Inter Milan have two games on hand over Stefano Pioli’s men.
There was a chance inside the first minute for Soule, who fired the ball over the crossbar, as the hosts piled on more pressure in the opening exchanges.
Yet it was the visitors who soon settled in and took the lead in the 17th minute, when Giroud connected with Rafael Leao’s pinpoint cross and cushioned the opener into the bottom right.
Milan goalkeeper Mike Maignan had only just made his first save, tipping Demba Seck’s effort over the crossbar, when Leao was punished for a handball at the right edge of his side’s 18-yard box.
Milan protested, but the penalty was ultimately upheld after a VAR check and Soule stepped up to the spot and fired past Maignan, who moved in the right direction but could not make the stop.
The period with electric pace slowed only briefly when Giroud appeared to tweak his ankle but was deemed fit to continue and soon came painstakingly close to picking up an assist, his delivery across the face of goal from a tight angle narrowly evading both the head of Yacine Adli and a diving Leao.
The hosts wanted Christian Pulisic charged with another handball, but the penalty shout was waived off, and Tijjani Reijnders was unable to break the deadlock when he nodded straight at Stefano Turati.
The Frosinone goalkeeper was forced into a nervy save deep in first-half stoppage time, reacting quickly after Leao’s effort took a dangerous deflection off Caleb Okoli and flew dangerously toward the far corner – Turati just able to stretch his hand out for the stop.
The hosts took the lead in the 65th minute, Soule slipping the ball to Mazzitelli, who came up the middle before handing his side the advantage with a low finish.
The home support had barely finished celebrating when Adli, from a corner, sent a cross to Giroud, who nodded towards the ball in the direction of Gabbia, who drew the sides level with a diving header.
Pioli brought in Jovic for Christian Pulisic in the 80th minute, a decision that paid off instantly when the Serbia striker pounced on a loose ball that had bounced off grounded Frosinone defender Simone Romagnoli and fired home.