Ross Draper's header late in extra-time sent Inverness Caledonian Thistle into the semi-finals of the Scottish League Cup against 10-man Dundee United.
Full-back Keith Watson smashed United into an early lead, but Inverness had the edge before the visitors's Nadir Ciftci was sent off after a mass brawl.
Gary Warren's bullet header levelled for the hosts on 54 minutes, but United held on to take the tie to extra-time.
It looked like penalties would decide it, but Draper headed the late winner.
Both teams have performed well in the opening quarter of the Scottish Premiership season.
But, as Caley Thistle manager Terry Butcher highlighted prior to kick-off, this season's League Cup is wide open, especially given Celtic's exit at the hands of Morton.
Butcher named the same starting line-up that began the abandoned Highland derby on Friday, presumably thinking his players would be fresh after only 45 minutes of action.
However, his team were trailing after only five minutes. Ryan Gauld sent a cross-field pass into the path of United full-back Watson and his powerful shot fizzed past the helpless Dean Brill.
Aaron Doran looked the player most likely to create or score an equaliser for Inverness and his ball across the face of goal was ideal for Billy McKay to convert - but midfelder John Rankin did just enough to prevent the Northern Irishman from applying the finishing touch.
Dundee United striker Nadir Ciftci is sent off by Kevin Clancy
Both teams attacked at will, Inverness buoyed by the goal and United still on a high from their stylish display in their 4-0 win over St Mirren at Tannadice on Saturday.
Despite that performance, United boss Jackie McNamara had made three changes, with John Souttar, Mark Wilson and Brian Graham dropping to the bench and Watson, Sean Dillon and Stuart Armstrong earning starts.
Terrors goalkeeper Radoslaw Cierzniak showed good hands to gather a long-range strike by Doran and the Pole was relieved to watch a subsequent first-time strike by the Irishman flash narrowly wide.
Tempers frayed at the end of the first half and, following Richie Foran's collision with Gary Mackay-Steven, referee Kevin Clancy sent off Ciftci for his involvement in the aftermath.
Ciftci's team-mates Gavin Gunning and Paul Paton picked up bookings, as did Foran, while Mackay-Steven also went into the book.
Clancy then ordered Butcher and United assistant boss Darren Jackson to the stand for their vocal interventions.
Inverness, for all their effort, were a goal down at the break, but they soon made their one-man advantage count after half-time as Graeme Shinnie's free-kick was met by Warren, who powered a header past Cierzniak from five yards for his second goal of the season.
With their tails up, they created a second chance that ought to have completed the comeback - but Doran was denied by a brave save by the United keeper, who hurt himself in doing so and subsequently struggled with his movement.
Dillon, Rankin and left-back Andrew Robertson were booked as United fought to avoid going behind, meaning six of their remaining 10 players risked joining Ciftci in the changing room.
Gunning deflected a late Doran shot wide to ensure the match went into extra-time and again it was Caley Thistle who threatened in the first 30-minute period when McKay hit an effort wide.
The home side continued to press and, as a shoot-out loomed, Danny Williams lofted a cross to the back post where Draper was lurking to thump a header beyond Cierzniak and end United's League Cup challenge.
Inverness Caledonian Thistle
- 12 Brill
- 03 Shinnie
- 18 Tremarco Booked (Polworth - 107' )
- 08 Draper
- 05 Warren Booked
- 06 Meekings
- 15 Watkins (Williams - 85' )
- 09 Foran Booked
- 07 McKay Booked
- 11 Ross (Agdestein - 100' )
- 10 Doran
- 01 Esson
- 14 Devine
- 19 Williams
- 20 Polworth
- 23 Agdestein
- 01 Cierzniak
- 04 Watson
- 03 Robertson Booked (Butcher - 80' )
- 08 Rankin Booked
- 02 Dillon Booked
- 05 Gunning Booked
- 07 Gauld
- 06 Paton Booked
- 09 Ciftci Dismissed after an earlier booking
- 10 Armstrong (Graham - 45' Booked )
- 11 Mackay-Steven Booked (Gomis - 45' Booked )
- 12 Butcher
- 13 McCallum
- 14 Gomis
- 15 Goodwillie
- 16 Graham
Ref: Kevin Clancy