Richard Hastings (second left) sent the tie into extra time
Inverness survived a scare from First Division strugglers Morton to progress to the last eight of the Co-op Insurance Cup after extra time.
Jim McAlister pounced on a seemingly innocuous long throw into the box after 34 minutes to give Morton the lead.
The home side spurned several chances to double their tally and were punished when Richard Hastings' 79th-minute header sent the tie into extra time.
And Dougie Imrie's volley nine minutes from time put Caley Thistle through.
Morton had progressed to the third round of the competition thanks to a thrilling 4-3 win over Hibernian, but the opening 45 minutes of this clash at Cappielow was a largely uninspiring affair.
The first real shot on target arrived with more than 15 minutes on the clock when Don Cowie produced a weak effort that did little to trouble Kevin Cuthbert in the Morton goal.
The goalkeeper then had to deal with a poor passback from Chris Smith, which he managed to control on his chest with no Inverness players lurking to cause him any problems.
Morton's first chance came courtesy of Ross Tokely conceding a foul on the left flank.
Steven Masterton whipped the free-kick across the face of goal and Iain Russell was only inches from connecting at the far post.
Ryan McGuffie then found himself dispossessed in the middle of the park, gifting Inverness a shot at goal, but Garry Wood dragged well wide from 40 yards.
The breakthrough came after 33 minutes and it was the home side who were celebrating when Brian Wake supplied the cross and McAlister bundled home from all of four yards.
Inverness made a change at the interval, Rory McAllister making way for the introduction of Barry Wilson, as the Highlanders attempted to battle their way back into the tie.
Instead, it was the home side who should have extended their lead shortly after the restart.
McAlister embarked on a decent run on the left flank, racing past Jamie Duff before rifling a shot at goalkeeper Ryan Esson, who managed to clear for a corner with McGuffie loitering with intent on the line.
Morton then had another chance to put the tie out of Inverness' reach.
Russell Duncan fouled Wake just outside the box and Masterton's curling free-kick was only denied the back of the net by an excellent block from Esson.
The Greenock side were left ruing those misses as Inverness hauled themselves back onto level terms with 11 minutes to go.
Hastings threw himself in front of a deep cross from Tokely and nodded home the equaliser.
Imrie's sweetly-struck volley after 111 minutes of play denied Morton another shock SPL scalp.
Morton manager Davie Irons: "For 65 minutes, I thought we looked comfortable.
"Inverness are a good team, but I thought we matched them and looked comfortable at 1-0.
"My players are very disappointed and they were very quiet in the dressing room afterwards because they matched an SPL side for 120 minutes.
"Any footballer is disappointed to lose a game, but especially when you have matched a team from a higher division.
"Overall, I thought we acquitted ourselves well and I'm very proud of my players."
Inverness Caley Thistle manager Craig Brewster: "I said to the guys, this one is about character and it just wasn't good enough in the first half.
"The crosses were abysmal in the first half and we looked like we had no chance of scoring.
"But we started to get to grips with the game in the second half and we started to produce as the game went on.
"I don't know where Richard Hastings came from for the equaliser but it was quality from Dougie Imrie at the end."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.