Inverness moved up to third in the Scottish Premier League as bottom club Dundee sustained their fifth straight home defeat this season.
The visitors struck twice in the opening six minutes through Billy McKay and Gary Warren.
Colin Nish's crisp shot hauled Dundee back into the match.
Andrew Shinnie calmly stroked home a penalty to put the game beyond Dundee and McKay put it beyond doubt four minutes from time.
The Highlanders go level on points with Aberdeen and St Johnstone but Terry Butcher's men have the better goal difference, with the Dons and Saints in action on Saturday.
Barry Smith's Dark Blues remain four points adrift of local rivals Dundee United, who have played three games fewer.
Inverness struck twice in quick succession to leave Dundee with a mountain to climb.
McKay netted the opener after a misplaced Dundee pass led to Aaron Doran firing in a shot that Rab Douglas diverted into the striker's path.
Two minutes later, Inverness added to their early goal when Warren raced on to the end of Doran's free-kick into the far post and hit a shot high past Douglas.
Dundee clawed their way back into the game and a Nish header brought a comfortable save from Antonio Reguero.
The Spanish keeper had no answer to Nish in the 13th minute though, as the big striker turned neatly on the left side of the box and fired across him into the far corner of the net.
Reguero was sharply off his line to block McAlister's shot as half-time approached and, on 42 minutes, he made a fine save, leaping to his right to beat away a Nish volley from Steven Milne's cross.
Two minutes into the restart, Milne missed a great chance to level for Dundee, shooting wide from just six yards with the goal gaping.
Ross Draper hit the bar for Inverness with 14 minutes left but, shortly afterwards, the visitors went 3-1 up from the spot after substitute Shane Sutherland had been fouled by Iain Davidson.
Shinnie converted and then laid on the pass for McKay's second goal, the forward side-stepping his marker to fire past Douglas.
Sorry, we were unable to load match stats, please try again.