Inverness eventually eased themselves into Monday's William Hill Scottish Cup draw despite a power cut threatening to cause the abandonment of their 4-0 fourth round victory at home to Morton.
A penalty by Nick Ross in the 45th minute had put Inverness 1-0 in front, before the lights went out during the interval due to a major substation that serves part of the city going down.
However, after a delay to the start of the second half of around 35 minutes, the game was played to a conclusion.
Billy McKay scoring in the 71st and 88th minutes, before Aaron Doran completed the scoring from the spot in injury time after Scott Taggart was shown a red card.
Inverness, who still had under-20s coaches Duncan Shearer and Scott Kellacher in temporary charge, had to make one enforced change from the side that had overcome St Johnstone 1-0 in the Scottish Premiership last weekend with captain Richie Foran suspended after picking up two yellow cards in the competition last season.
His place in midfield was taken by Liam Polworth, coming in for only his second start of the season for a Caley Thistle side still minus the injured James Vincent.
Morton also went into the encounter without a manager following Allan Moore's dismissal last weekend.
David Hopkin was named as interim boss and he made four changes from the side that lost 5-1 to Livingston last time out.
Taggart, Stephen Stirling, Thomas O'Ware and Mark Russell all came in for Morton. Jonathon Page dropped down to the bench, while Kabba-Modou Cham was suspended. Mark McLaughlin and Michal Habai dropped out altogether.
Caley Thistle went into the game on the back of four straight wins and they quickly set about asserting themselves against lower league opposition.
Ross Draper won the ball 25 yards out and found Doran. He fed a pass in to McKay, but he dragged his effort from the angle well wide.
Doran went even closer moments later after being set up by Ross, only to see his low strike from 18 yards fly just wide.
Morton might be propping up the Scottish Championship, but they almost stunned their hosts when Nacho Novo was the beneficiary of a misplaced pass by Draper, firing in a dipping volley from 25 yards that Inverness goalkeeper Dean Brill tipped over.
This provoked an immediate reaction from Caley Thistle, Draper sending one in from 20 yards that narrowly missed the target, before visiting custodian Nicolas Caraux produced a stunning save to keep out McKay's stinging volley from the angle of the box.
The pressure was building on Morton and it took a point blank save from Caraux to prevent McKay's close range overhead kick from finding the target.
Inverness, however, were almost punished for a moment of complacency as the interval approached.
Carl Tremarco's throw-in put Brill in trouble as he attempted to clear under pressure from Novo. The Spaniard managed to nick the ball and get in a shot at goal, but Gary Warren produced a timely block.
The action soon switched to the other end and once more Caraux was called upon, this time to get a hand to Draper's audacious volley from 22 yards.
Caley Thistle's persistance was rewarded on the stroke of half-time with the opening goal.
Draper was adjudged to have been taken down by Craig Reid inside the box and Ross converted the resulting spot-kick to give Inverness the initiative at the interval.
After a lengthy delay in restarting due to the power going off, the second half finally got underway and it was Caley Thistle immediately in the ascendancy, Doran and McKay both passing up decent opportunities.
Draper then struck the woodwork as Inverness looked to finally put the game out of the visitors' reach.
It was one-way traffic and Ross just could not keep the ball down when collecting McKay's header 10 yards out.
Morton did cause a brief moment of concern when Novo turned home Dougie Imrie's free-kick, but it was ruled out for an offside.
Caley Thistle continued to press and were rewarded for their efforts in the 71st minute, McKay getting his head on the end of a Marley Watkins cross to the back post to send a looping effort beyond the helpless Caraux.
McKay then scored his 13th goal of the season two minutes from time, tapping home Doran's cross.
Doran put the seal on the victory in injury time with another penalty after Taggart was shown red for felling substitute Torbjorn Agdestein as he raced through on goal.