AC Milan rescued a 2-2 derby draw against Inter with the last kick of the match as they dealt a blow to their city rivals' European hopes.
First-half goals from Antonio Candreva and Mauro Icardi had looked set to give Stefano Pioli's men a much-needed win in their Europa League chase but Alessio Romagnoli and Cristian Zapata salvaged a draw with goals in the 83rd and 97th minutes.
READ MORE: How Milan v AC unfolded
Pressure has been mounting on Pioli, while the mood in the Milan camp has been one of positivity following six victories in their last nine and the long-awaited completion of the €740million takeover by Chinese investors this week.
Milan started brightly at a packed San Siro, with tifos and smoke grenades covering the stands, but Candreva followed up his goal in the 2-2 derby draw in November with a well-taken opener in the 36th minute.
Icardi doubled the lead before half-time with his first goal against Milan and the Nerazzurri had looked in firm control until a remarkable finale.
Romagnoli stabbed in from Suso's cross to give his side a lifeline before Zapata turned the ball off the crossbar and over the line following a corner in the seventh minute of stoppage time.
Vincenzo Montella's side stay in sixth place with the draw, two points above Inter, who are now without a win in four matches.
Milan were gifted a chance with barely 90 seconds on the clock, with Gerard Deulofeu seeing a shot blocked and Carlos Bacca skewing the ball over the crossbar after Roberto Gagliardini had lost possession in his own half.
Deulofeu struck the base of the post with a low strike from the right of the area but Inter threatened straight away on the counter-attack in a breathless opening 20 minutes.
The match descended into a more scrappy phase but Samir Handanovic had to be alert to halt another darting run down the left from Deulofeu, who had looked the brightest player on the pitch.
But it was Inter who drew first blood with their first goal before half-time in a derby match since Walter Samuel in 2012. Gagliardini's simple long ball from halfway allowed Candreva to run in behind Mattia De Sciglio and loop a clever finish over Gianluigi Donnarumma and into the bottom-left corner.
Two minutes before half-time, Inter seized control of the match. Ivan Perisic combined well with Joao Mario down the left and drilled a low cross into the path of Icardi, who fired into the gaping goal from six yards.
Montella's side pushed for a lifeline after the break but Perisic should have made it 3-0, the Croatia winger shooting straight at Donnarumma after being picked out by Icardi following a swift counter-attack.
Handanovic tipped a bouncing Deulofeu strike past his left-hand post but survived a nervy moment when he lost his grip on the ball under pressure from Bacca, who was unable to fashion a chance to shoot.
Milan kept up the pressure and Romagnoli gave them hope of a comeback in the 83rd minute, prodding Suso's cross from the right beyond Handanovic from the edge of the six-yard box.
And Zapata sent the Rossoneri faithful into raptures in the last seconds of the match, steering the ball off the bar and clearly over the line following Manuel Locatelli's corner, with the referee blowing for full-time just as the Milan celebrations began.