There was stoppage-time heartbreak for Dundee United as they crashed out of the William Hill Scottish Cup to Inverness Caley Thistle at Tannadice.
It had looked like the sides would do it all over again in a replay in the Highlands as the scoreline stood at 1-1 going into the second minute of added-on time.
However, Aaron Doran’s last-gasp header sent the Highlanders through to a money-spinning Hampden semi-final.
Joe Chalmers’ superb strike on 19 minutes had given the visitors a thoroughly deserved lead as United struggled to make any impact on the match.
The Tangerines, however, pulled themselves level on 68 minutes thanks to Nicky Clark’s penalty following a foul on substitute Paul McMullan.
However, the finale to the game was an absolute stunner for the United supporters, who had once again turned out in decent numbers.
The Tangerines had made two changes to the side that started the 1-0 win over ICT on Tuesday night.
Out went the suspended Calum Butcher to be replaced by captain Fraser Fyvie, while McMullan dropped to the bench and in came Cammy Smith.
The first decent chance fell to the visitors on four minutes when match-winner Doran tested United keeper Benjamin Siegrist with a low drive that had to be pushed away for a corner.
ICT had the second good opportunity, too, with a Liam Polworth freekick headed over by Jordan White from close range.
The hosts had made a quiet start and they deservedly fell behind on 19 minutes.
It was a great goal from the Highlanders’ perspective, with Chalmers taking a pass from Polworth, stepping to his left to beat Jamie Robson then curling a great strike into the net from just outside the corner of the box.
Chalmers came within a whisker of making it 2-0 just three minutes later when the United defence stood like statues and he rattled Siegrist’s bar from 10 yards.
The Tangerines had hardly been up the park but they did make it upfield a minute later, only for a deep cross from Peter Pawlett to go across the face of goal and out.
United finally warmed up and a nice ball through by Smith found Pawlett but the shot was blocked by Carl Tremarco.
On 38 minutes, a nice United move ended when midfielder Ian Harkes scooped his shot over from 20 yards.
Clark had a strike blocked then skipper Fyvie blasted over the bar in first-half stoppage-time.
It was a poor first 45 minutes from the home team and they had to play much better after the break to have any hope of staying in the cup.
It still wasn’t happening for them, though, and they made a change on 53 minutes, bringing on McMullan for Smith.
Polworth forced Siegrist into a good save when he fired in a freekick from the tightest of angles and the Swiss goalie had to look lively to keep the ball out.
The visitors were looking comfortable and the onus was on the Tangerines to shake them up.
However, it was ICT who came close next when Charlie Trafford fired a shot just wide from outside the box.
It got livelier for the Tangerines on 66 minutes, though, when McMullan shot from 20 yards and Inverness goalie had to push it away.
United finally got their act together and levelled from the penalty spot on 68 minutes.
There was a challenge from White on McMullan inside the box and the Tannadice sub fell to the floor. The Inverness players thought it was soft but there was contact toe to toe.
Clark stepped up and slammed home his third spotkick in four games.
On 73 minutes, the Highlanders went on the attack again and it needed a brave save from Siegrist to smother a strike from White as he raced in on goal.
On 83 minutes, Inverness had the ball in the net when Polworth’s freekick was headed home by sub Nathan Austin but it was flagged offside.
ICT player White had a red face after taking time out to taunt the United fans in the Eddie Thompson Stand.
They did get it right late on, though, and the manner of the winning goal will have had home boss Robbie Neilson tearing his hair out.
It came from a throw-in by Brad McKay that was flicked on by White. Doran was alert to it all and stooped to head into the net from just a couple of yards out.
The goal sparked wild scenes as members of the ICT backroom team and some travelling supporters ran on to the pitch to celebrate.
The United heads went down and off they traipsed after this latest disappointment for the club.
In truth, they only had themselves to blame for a display that never really deserved a trip Hampden.
Dundee United: Siegrist, Fyvie (Gomis 64), Clark, Safranko, Robson, Smith (McMullan 53), Reynolds, Harkes, Seaman, Pawlett, Connolly. Subs not used: Laidlaw, Booth, Stanton, Nesbitt, Watson.
Inverness CT: Ridgers, Tremarco, Chalmers, Donaldson, McCart, Polworth (Rooney), Doran, Welsh, White, McKay, Trafford (Trafford 76). Subs not used: C. Mackay, McCauley, D. Mackay, McGregor, Hyde.
Referee: Steven McLean.