Milan booked a place in the quarter-finals of the Coppa Italia with a penalty shoot-out victory over Torino at San Siro following a goalless draw after extra time.
The Serie A leaders eased to a 2-0 win when the sides met in the league on Saturday but found it a lot tougher to break down their opponents - 28 points worse off in the league - in Tuesday's cup tie.
Zlatan Ibrahimovic squandered the best early opening on his first start since November 22 and Milan then dominated the second half, twice hitting the post and having a penalty shout turned down.
Neither side could find a way through in the additional 30 minutes, but it was the hosts who prevailed on spot-kicks to set up a tie with Fiorentina or Inter - Hakan Calhanoglu scoring the decisive penalty after Ciprian Tatarusanu had denied Tomas Rincon.
Milan head coach Stefano Pioli made five changes to his starting line-up from the league clash between the sides, and it was one of the returning faces who went closest to scoring in an uneventful first half.
Ibrahimovic took advantage of Torino's lopsided defensive line, controlled Davide Calabria's pass over the top and fired a dipping half-volley over the crossbar from 15 yards.
Tatarusanu was making just his fourth appearance for Milan since joining last year and made a good one-handed save to keep out Amer Gojak's curler seven minutes before half-time.
Ibrahimovic and Samu Castillejo were replaced by Jens Hauge and Calhanoglu after the interval and Milan looked a lot livelier in the early stages of the second period.
Rafael Leao, among the scorers on Saturday, failed to get the better of Vanja Milinkovic-Savic when played in by Brahim Diaz and then had a shot kept out by the Torino goalkeeper.
Milan's pressure looked to be telling as Diogo Dalot and Calabria hit the post in the space of two minutes.
But the home side's frustration soon started to show, with substitute Gianluigi Donnarumma issued a red card for dissent after a second penalty call went against Leao following a challenge from Milinkovic-Savic.
Diaz ballooned over the bar from 10 yards to signal extra time. These sides also needed extra time when they met at the quarter-final stage last season, Milan coming through 4-2 winners, but substitute Theo Hernandez's saved shot was the closest either side came to a breakthrough here in the additional 30 minutes.
Milan matched Torino in converting their first three penalties and visiting captain Rincon's saved effort towards the bottom-right corner proved decisive, allowing Calhanoglu to fire home and send his side through.
What does it mean? Milan still challenging on three fronts
Winning a first Scudetto in a decade will no doubt be the priority for Milan, who are three points clear at the Serie A summit after 17 matches, but they are also good value to go all the way in the Europa League and now the Coppa Italia after this slender win.
For a club of their pedigree, it seems remarkable that the most recent of the Rossoneri's five triumphs in this competition was back in 2003.
Pioli's men may have done things the hard way here, but the victory was ultimately deserved as they were the better side, getting nine shots on target to their opponents' three. They now wait to see who they will face in the last eight, with Fiorentina and bitter rivals Inter facing off on Wednesday.
Calhanoglu at his creative best
Not only did Calhanoglu score the winning penalty, he also proved to be Milan's most creative player despite only being brought on at half-time in normal time.
He created an unrivalled six big chances for team-mates, none of which the likes of Leao and Hauge could put away, and had four shots of his own.
Zlatan will need time
Ibrahimovic was brought on for the final five minutes on Saturday and was deemed ready to start this match on his latest injury return, but Pioli was only willing to use the veteran striker for 45 minutes. He had just one attempt during his time on the field - firing over from a promising opportunity - and created one big chance.
Milan looked a lot livelier when Leao shifted into a central position in the second half, suggesting Ibrahimovic has a battle on his hands to win back his place.
Key Opta facts
- Milan have reached the quarter-finals for a 12th consecutive season and have now won four of their last five Coppa Italia penalty shoot-outs.
- Tatarusanu has kept a clean sheet in three of his four games for Milan across all competitions.
- Milan have hit the woodwork 10 times in their last 10 games across all competitions.
- Centre-back Mateo Musacchio made his first Milan appearance for 325 days, having last featured against Fiorentina in February last year.
- Alessio Romagnoli is the only player to have started all of the five Coppa Italia games played by Milan during Pioli's reign.
Milan resume their Scudetto challenge with a trip to Cagliari next Monday, while Torino are at home to Spezia on their return to Serie A action on Saturday.