A stoppage-time penalty from Jeremy Menez spared AC Milan's blushes as the Rossoneri only just managed to avoid a humiliating home defeat to Frosinone.
Goals from Luca Paganini and Oliver Kragl gave the relegation battlers a shock 2-0 lead at San Siro and following half-time Mario Balotelli missed the chance to drag Milan back into contention when his penalty was saved.
Carlos Bacca did produce an overdue reply for the hosts, only for Federico Dionisi to extend Frosinone's advantage. However, Luca Antonelli inspired Milan with an acrobatic goal and then, two minutes into time added on, fellow substitute Menez salvaged a 3-3 draw from the spot.
The point was not enough to keep Sassuolo, 1-0 winners over Hellas Verona, from usurping Milan and snatching sixth place while Frosinone are four points from safety with only two games remaining.
Milan were fighting an uphill battle as soon as Paganini's thunderous drive beat home goalkeeper Gianluigi Donnarumma at the end of an early rapid counter-attack.
Just a minute before the break, Milan endured further embarrassment with Kragl whipping home a superb free-kick to give Frosinone their first ever two-goal lead away from home in the top flight.
Milan had a shot at redemption when Adriano Russo was cited for handball, but Balotelli could not get past Francesco Bardi with his spot-kick.
Bacca converted Ignazio Abate's cross to slash the deficit in the 50th minute, but hardly any time passed before Alex sloppily put Dionisi into a one-on-one with Donnarumma for a chance the Frosinone striker did not squander.
Antonelli had only been on the pitch for a minute when he wrote the next twist in the tale, the Italy left-back controlling the ball on his chest before pulling off an overhead kick with 15 minutes left.
And the Canarini finally had their bubble burst when Vasyl Pryima handled in the box, allowing Menez to force the draw with a sweetly-struck penalty.