Jonny Hayes netted a last-gasp leveller for 10-man Inverness to ensure a replay at East End Park against Dunfermline in the Scottish Cup fourth round.
The Irish winger pounced to tap in after a dreadful error from Pars goalkeeper Chris Smith in the fifth minute of stoppage time.
Caley Thistle goalkeeper Jonny Tuffey failed to clear on 29 minutes, letting in Andy Barrowman to score.
It followed the free-kick for which Kenny Gillet was shown a red card.
Northern Ireland international Tuffey had replaced ever-present goalkeeper Ryan Esson - who has failed to keep a clean sheet all season - in the one change to the Caley Thistle starting line-up.
Joe Cardle and Andy Kirk came in for Dunfermline, replacing Gary Mason and Paul Willis.
Hayes showed his attacking threat in front of 1,601 fans when he flashed a 30-yard free-kick over after 15 minutes.
Dunfermline's Martin Hardie then forced Tuffey into a save with a 25-yard free-kick that was the first shot on target.
The game sparked to life on 29 minutes when Gillet was shown a straight red card following a mix-up with Tuffey.
Caley Thistle's goalkeeper failed to clear a long ball and Barrowman nipped in before being brought down by Gillet on the edge of the box.
Referee Euan Norris gave the Frenchman his marching orders and Hardie's low free-kick was parried by Tuffey for Barrowman to nod home from close range.
At the opposite end, Smith was called into action moments later when Billy McKay turned smartly in the box before seeing his angled shot parried wide.
Hayes then headed over for the hosts from a similar angle after connecting with a long cross from Graeme Shinnie.
Smith thwarted Hayes moments before the interval when the winger shot low from 20 yards and, seconds later, a Hayes cross just needed a touch from either Gregory Tade or McKay as it floated inches wide.
The Pars goalkeeper was equal to another low Hayes shot from a 25-yard free kick, but no Inverness players anticipated the rebound and the goalkeeper clawed the ball back into his grasp.
Davis's cross-cum-shot towards the back post bounced off the crossbar as Caley Thistle continued to threaten.
Smith was almost caught out on 75 minutes when he flapped at a Davis corner, but Tade's header went wide.
Barrowman looked to punish the Highlanders further but shot just off target from outside the area.
However, there was late drama when Smith miskicked a clearance after Roman Golobart had kicked the ball long in the fifth minute of stoppage time.
Hayes capitalised on the error to sweep home the equaliser from just inside the box.
- 12 Tuffey
- 15 Tade
- 16 Golobart
- 19 Shinnie
- 22 Gillet Dismissed
- 02 Piermayr
- 06 Cox Booked (Meekings - 75' )
- 07 Hayes
- 25 Davis (Tansey - 80' )
- 09 Foran
- 21 McKay (Doran - 64' )
- 01 Esson
- 26 Meekings
- 08 Tansey
- 18 Sutherland
- 23 Doran
- 20 Smith
- 06 Keddie Booked
- 13 Boyle
- 15 Dowie
- 16 Potter
- 07 Cardle (Mason - 82' )
- 08 Hardie Booked (Thomson - 83' )
- 17 Burns Booked
- 09 Barrowman
- 10 Kirk Booked (Buchanan - 69' )
- 11 Graham
- 30 Goodfellow
- 39 Young
- 04 Mason
- 23 Thomson
- 19 Buchanan