Inverness CT 2-1 Ross County
Billy McKay's double secured a win for Inverness in the Highland derby and a place in the Scottish Cup fifth round.
Caley Thistle were ahead after nine minutes, when former Inverness defender Ross Tokely fouled Josh Meekings and McKay slotted in the resulting penalty.
Ross County were back on level terms four minutes from the break with a sublime 22-yard half-volley from former Caley Thistle midfielder Iain Vigurs.
But McKay struck again with a curling drive nine minutes after the break.
County were at least the equal of the side sitting second in the Scottish Premier League for much of the replay at Caledonian Stadium.
However, it was Caley Thistle who secured a fifth-round trip to face SPL rivals Kilmarnock at Rugby Park.
And it was great reward for that stoppage time equaliser in the 3-3 draw at Victoria Park.
Unchanged Inverness started where they left off in the weekend win over Hibs and took the lead when former Inverness stalwart Tokely was adjudged by referee Craig Thomson to have taken down Meekings in the area.
The 24-year-old McKay fired in the opener from the penalty spot.
Influential midfielder Stuart Kettlewell had replaced forward Gary Glen as County manager Derek Adams went for a less adventurous line-up to the one that lost to Motherwell.
That and the freezing conditions in the appropriately dubbed Cold Firm derby probably contributed to the game deteriorating into a battle of attrition as both teams had spells on top but failed to carve out anything to threaten either goal.
It took until the 35th minute for either side to threaten again and Aaron Doran just failed to mark his 50th appearance for Inverness with a goal as he shot narrowly wide.
However, it was County who struck next, Vigurs netting a beautiful equaliser, dinking the ball over charging goalkeeper Antonio Reguero from 25-yards and in off the underside of the crossbar.
Ross Draper might have put the home side back in front on the stroke of half-time, but he screwed his low piledriver just wide from Richie Foran's lay off.
County started brightly after the interval, with Rocco Quinn forcing Reguero into a save.
However, moments later, McKay netted his second of the game with a superb curling strike from just outside the box for his 13th goal of the season and seventh in the last five games.
Vigurs had the opportunity to level the scores after 68 minutes when he connected with a Quinn cross, but the close-range header was straight at Reguero.
Seconds later, County substitute Grant Munro watched as his header was cleared off the line by David Raven.
Colin McMenamin was next to try his luck after being played through by Scott Boyd, but his low effort rippled the side netting.
County substitute Steven Ross headed a Mark Fitzpatrick cross just wide with seven minutes remaining and visiting captain Richie Brittain had the chance to grasp a last-minute equaliser, but it was cleared by Meekings.