(CNN) -- Striker Goran Pandev scored early in extra time to give Lazio a 2-1 win at 10-man AC Milan to secure a place in the Italian Cup quarterfinals on Wednesday.
Lazio players celebrate Goran Pandev's winning goal in their 2-1 victory at AC Milan.
Andriy Shevchenko put Milan ahead with a superb strike on 77 minutes after Emerson's dismissal for two yellow cards 11 minutes earlier.
But Mauro Zarate scored the equalizer from the penalty spot just three minutes from normal time after Giuseppe Favalli had fouled Pandev.
The Macedonia striker then netted a rebound two minutes into the first extra period of extra time to set up a clash against Fiorentina or Torino in January and February's last eight.
Milan, who lost 3-1 at Palermo in the league on Sunday, started with Kaka and Ronaldinho for the club's first appearance in this season's cup but also fielded reserve goalkeeper Dida.
The match was the only cup game this week with the last 16 round spread over three months because of fixture clashes.
Napoli, Udinese and Sampdoria are already through to the quarterfinals having won their ties last month while holders Roma entertain Bologna and Fiorentina host Torino on December 17.
Serie A leaders Inter Milan welcome Genoa on January 13 and Juventus wrap up the round with a home tie against Catania on January 14.