Andrea Ranocchia headed the winning goal in the last minute of extra time as Inter Milan edged out Bologna 3-2 in a thrilling Coppa Italia quarter-final at the San Siro.
At the end of a match that produced a raft of high-quality strikes, Ranocchia popped up in the 120th minute to head home a corner beyond despairing Bologna goalkeeper Federico Agliardi, who went to ground much too easily under the challenge of Esteban Cambiasso.
Inter's win secures a two-legged semi-final encounter against the winner of Wednesday night's tie between Fiorentina and Roma.
Inter took the lead in the 34th minute when Fredy Guarin took aim from the edge of the area and drilled a fierce shot beyond Agliardi.
The hosts looked to have the game wrapped up in the 77th minute when Rodrigo Palacio added a stunning second, the substitute galloping down the left channel before cutting inside and curling in a thumping strike from 25 yards.
Bologna made a game of it in the 80th minute, however, as Alessandro Diamanti fired home a wonderful free-kick, and the unlikely fightback was complete four minutes later when Manolo Gabbiadini turned home Marco Motta's set-piece.
Both sides had chances to find a winner in normal time but 30 additional minutes were required, at the end of which Ranocchia emerged the hero as he nodded Inter into the last four.