Caley Thistle manager Duncan Ferguson was relieved his side only lost 2-1 in the Championship play-off final first leg at League One runners-up Hamilton Accies.
A sensational long-ranger from striker Kevin O’Hara and a bullet header from Fergus Owens shot Accies 2-0 ahead inside the first 23 minutes.
Substitute Aribim Pepple fired ICT – ninth-placed Championship finishers – back into the contest in the second half and that strike keeps their survival chances alive.
As they seek to avoid relegation, they return to the Caledonian Stadium for this Saturday tea-time’s second leg and Ferguson knows this was a stern test against John Rankin’s confident team.
He said: “We knew Hamilton would come right at us. And they did and they caused us problems in the wide areas.
“It took a wonder goal – which sums up our season – to put them ahead. It came off the post, hit our keeper and went in. Hamllton started very well but their second goal was a free-kick for us, on our goalkeeper but the referee (Graham Grainger) never seen it with a lot of bodies.
“Hamilton were very good in the first 30 minutes and we had to weather the storm. Had we conceded another, it would have been a bridge too far.
“All credit to my team as we got back into the game. We pushed and pushed for the goals in the second half. I am pleased to come away with 2-1 as it could have been more.
“It is all to play for now.”
Inverness made three starting changes from Saturday’s 1-0 semi-final win over Montrose, with Danny Devine, Luis Longstaff and Charlie Gilmour in for benched James Carragher and Remi Savage and injured Everton loanee Sean McAllister respectively.
Accies, whose 3-2 win over Alloa put them into the final with a 5-4 aggregate scoreline, made just one change to their starting 11 as Owens came in for Lee Kilday, who dropped to the bench.
Accies, who went down from the Championship 12 months ago, had suffered only one defeat in 13 outings going into this one, with ICT having just one loss in their previous seven fixtures, boosted by two successive clean sheets.
And it was a dream start for John Rankin’s hosts and a nightmare for Inverness as the opening goal flew into the net in sensational style in the fifth minute.
O’Hara, spotting Mark Ridgers off his line, unleashed a shot from 40 yards, it hit the post, came off the keeper’s back and flew into the net.
The Highlanders had to stand strong immediately after this cruel set-back and captain Billy Mckay was just off he mark with the pick of the bunch from a few half chances.
Hamilton, backed by their vocal fans, were dangerous though and Euan Henderson swerved a shot over the crossbar after cutting into the penalty area.
On 22 minutes, the task toughened for ICT when Owens headed home his first Accies goal of the season after he reacted quickest to Ridgers blocking Dylan McGowan’s effort. There were some appeals for a foul on on the keeper, but it was 2-0.
Hamilton had their tails up – this was a dangerous period for the visitors. Inverness had a burst of pressure before half-time, but it came to nothing.
Ferguson pitched Carragher on for Duffy and Samson Lawal for Gilmour at the start of the second half in a shake-up and Carragher powered a header over the bar four minutes later from Cammy Harper’s corner.
The South Lanarkshire side were bursting with confidence and looking to effectively put this final to bed.
However, Inverness were looking for openings too, but their opponents were well-shaped and sharp all around.
A weak Mckay shot and a cross plucked out of the sky from goalkeeper Dean Lyness was as close as it came with 25 minutes to go.
However, their spark came from their third substitution of the night.
Just moments after replacing Alex Samuel, fellow striker Pepple was ideally placed to slam a low shot past Lyness after being picked out by Harper.
Inverness had a lifeline and there were some nerves in the home stands now.
And Pepple, who scored in the recent 1-1 draw at Dunfermline, drew a save next from Lyness after a pass from Max Anderson.
Both teams will believe this final can be won for different reasons this weekend. Inverness must do it the hard way.
Player ratings
HAMILTON (4-4-2): Lyness 6, Tumilty 6 (Hewitt 74), McGowan 6, Owens 7, Longridge 6, Lewis Smith 7, Barjonas 6 (Redfern 46), Martin 6 (Rose 74), Henderson 7 (Winter 67), Williamson 6, O’Hara 7 (Hastie 90).
Subs not used: Jamie Smith (GK), Kilday, Murray, Hendrie.
CALEY THISTLE (3-5-2): Ridgers 5, Duffy 5 (Carragher 46), Devine 6, Boyes 6, Kerr 6, Longstaff 5 (MacGregor 81), Gilmour 5 (Lawal 46), Anderson 5, Harper 6, Samuels 6 (Pepple 66), Mckay 6 (Brooks 81).
Subs not used: Mackay (GK), Samuels, Savage, Lawal, Ujdur.
Referee: Graham Grainger
Attendance: 1,389.
Man of the match: Euan Henderson.