Zlatan Ibrahimovic and Romelu Lukaku were involved in an ugly clash before Christian Eriksen's 97th-minute winner gave Inter Milan victory in a dramatic Coppa Italia derby.
Former Tottenham midfielder Eriksen came off the bench to score a superb free-kick as Inter came from behind to reach the semi-finals.
It was virtually the final act of a match in which Ibrahimovic scored, became embroiled in an unseemly spat with former Manchester United team-mate Lukaku, and was then sent off.
Ibrahimovic put AC Milan in front with a clinical finish in the 31st minute, his eighth goal in seven appearances against Inter ensuring his side led at the interval.
He was then booked for his part in a head-to-head clash with Lukaku, who had to be pulled away as he tried to confront the Swede when the players left the field at half-time.
Ibrahimovic was dismissed 13 minutes into the second half for a foul on former Manchester City defender Aleksandar Kolarov, and Inter capitalised on their numerical advantage.
Lukaku got the equaliser from the spot after Rafael Leao fouled Nicolo Barella in the box, with referee Paolo Valeri awarding the penalty after viewing the incident on the pitchside monitor.
Inter continued to press but found Milan goalkeeper Ciprian Tatarusanu in inspired form until Eriksen curled home a free-kick to set up a semi-final against Juventus or SPAL, who meet on Wednesday.
It was Eriksen's first goal of the season, with the Dane starting just four league games this campaign.
He has been linked with a move back to England but Inter boss Antonio Conte was adamant Eriksen is going nowhere during the January transfer window.
"I have been repeating for a month that no-one will arrive and no-one will leave," said the Italian.
"He is a very intelligent player, he has quality and he is part of the project."
AC Milan boss Stefano Pioli told reporters Ibrahimovic said sorry to his team-mates after the match for getting sent off.
"He apologised like the great champion he is. He got a bit caught up in the desire to help the team," added Pioli.
- 6de Vrij
- 11KolarovSubstituted forYoungat 90+2'minutes
- 36DarmianSubstituted forHakimiat 45'minutesBooked at 90mins
- 77BrozovicBooked at 52minsSubstituted forEriksenat 88'minutes
- 14PerisicSubstituted forMartínezat 67'minutes
- 9LukakuBooked at 45mins
- 24KjaerBooked at 17minsSubstituted forTomoriat 20'minutes
- 79KessiéBooked at 90mins
- 56SaelemaekersSubstituted forCastillejo Azuagaat 85'minutes
- 21DíazSubstituted forRebicat 60'minutesBooked at 64mins
- 17da Conceição LeãoSubstituted forKrunicat 85'minutes
- 11IbrahimovicBooked at 58mins
- 7Castillejo Azuaga
- 20Kalulu Kyatengwa
- 90A Donnarumma
- Paolo Valeri
- Shots on Target
- Mark Wright's Last Chance: He's made his debut, now can he keep a spot in the team?
- Secrets of Cinema: How British comedy kept us all laughing