Holders Juventus struck twice in the first half hour but nearly let the game slip against 10 men in the second half as they hung on for a 2-1 win over AC Milan in their Coppa Italia quarter-final on Wednesday.
Juve, who had failed to beat Milan in two previous meetings this season, raced to a two-goal lead as Paulo Dybala volleyed home after 10 minutes from an unmarked position, then Miralem Pjanic curled in a free kick in the 21st minute.
Sami Khedira had another effort disallowed as Juventus threatened to overwhelm their opponents.
But Milan came back strongly after halftime and Carlos Bacca reduced the arrears with a brilliant volleyed effort eight minutes after the re-start.
Despite having Manuel Locatelli sent off for a second bookable offence one minute later, Milan continued to throw themselves forward and Juventus goalkeeper Norberto Neto had to make a difficult save from Juraj Kucka's free kick.
Substitute Gerard Deulofeu also tested Neto as Juventus held out to earn a semi-final tie against Napoli.