Two goals in two dramatic closing minutes prevented Inverness Caledonian Thistle making it three Scottish Cup wins out of three against Celtic.
Kenny Miller scored Celtic's winning goal at Caledonian Stadium
Graham Bayne fired Inverness ahead from six yards after a fine run and cross from Barry Wilson after 18 minutes.
Shunsuke Nakamura blasted an effort off the bar before Steven Pressley's 89th-minute header levelled the game.
It looked like the quarter-final was destined for a replay until Kenny Miller fired home from 20 yards.
Ian Black had been chosen ahead of Rory McAllister for Inverness and the only change from last week's league defeat by Motherwell was the first to threaten either goal.
Midfield colleague Ian Rankin's pass found Black in space, but his drive from 22 yards flew a few yards wide.
Celtic's Jan Vennegoor of Hesselink, Craig Beattie and Maciej Zurawski had all failed late fitness tests.
So it meant a lone role up front for Miller, but he was given an early chance to improve his record of one goal in his last 19 appearances.
Jiri Jarosik, promoted from the bench following the midweek draw with AC Milan to fill a supporting role for Miller, played a neat through ball.
But goalkeeper Michael Fraser blocked the Scotland man's effort with his outstretched foot.
Graham Bayne had put Inverness ahead after 18 minutes
Pressley and Paul Hartley had returned to the Celtic starting line-up after being cup-tied in midweek, replacing Darren O'Dea and Aiden McGeady.
But Celtic's new line-up fell behind following a superb move started by Ross Tokely.
Black swept the ball wide to Wilson, who ghosted past Mark Wilson and sent in a low cross that was steered home by Bayne from six yards.
Celtic continued to have the territorial advantage and Fraser did well to turn a curling effort from Nakamura one-handed round the post.
But Celtic could have been two down when Rankin's 22-yard drive was spilled by Artur Boruc and Bayne forced the ball home only for his celebrations to be cut short by an offside flag.
Inverness lost Roy McBayne to injury at half-time, with Richie Hart coming into midfield.
MY SPORT DEBATE: Give your thoughts on the match
Celtic began to take charge and were unlucky not to equalise when Nakamura's piledriver from a difficult angle rebounded off the underside of the bar after a clever Miller back-heel.
The lacklustre Scottish champions and Scottish Premier League leaders pressed forward.
But Inverness looked like matching their wins of 2000 and 2003 until Pressley headed in from two yards following a corner and Miller's fine, curling finish completed the fightback.
Inverness CT: Fraser, Tokely, Dods, Munro, Hastings, Wilson (McAllister 86), Black (McSwegan 77), Duncan, Rankin, McBain (Hart 45), Bayne.
Subs Not Used: Ridgers, McCaffrey.
Booked: Wilson, Bayne, Black.
Goals: Bayne 18.
Celtic: Boruc, Wilson (Sheridan 73), Pressley, McManus, Naylor, Hartley, Lennon, Sno (Gravesen 78), Nakamura, Jarosik (McGeady 65), Miller.
Subs Not Used: McGovern, Telfer.
Goals: Pressley 89, Miller 90.
Ref: D MacDonald