Second Division Partick Thistle squeezed into the last eight of the Scottish Cup after a dramatic penalty shootout at Firhill.
Only three SPL teams now remain in the Cup after Kenny Arthur saved penalties from Dennis Wyness and Ross Tokely to become the hero of the night.
Will Snowdon scored the clinching penalty and Mark Roberts, Ricky Gillies and Sean Kilgannon also converted.
It sets up a quarter-final against Hearts at Tynecastle.
Caley came close in the opening minute when Barry Wilson sought out the corner of the net with his right foot, but Arthur managed to palm his shot round the post.
From the resultant corner, Wyness beat the offside trap but shot tamely wide with the goal at his mercy.
Craig Dargo beat Arthur with a header after 13 minutes but Marc Smyth scurried back to hook his effort off the line.
It was the home side who went in front against the run of play two minutes later when Adam Strachan headed on a Stephen McConalogue corner and Roberts was at the back post to net.
A minute later, Dargo squandered another chance when he dragged his right-foot shot wide with Arthur exposed.
Caley equalised after 24 minutes when Arthur failed to deal with a cutback from Ian Black and Wyness finished with his left foot.
Partick threatened first in the second half but Paul Ritchie was over-ambitious with an angled attempt from outside the area that Mark Brown easily dealt with.
McConalogue was then a yard wide with a right-foot shot from 20 yards, which he should have done better with.
Dargo had a chance with five minutes left but Arthur saved comfortably to keep Partick alive.
Chances were few and far between in extra-time although Roberts forced a save from Brown in the final minute before the tie was settled on penalties.