St Mirren surged to the top of the table with a slick display against a Caley side who are still struggling to find their feet in the Championship.
Yet the visitors should have been ahead with their first attack, Brad McKay heading wide from close range.
Saints responded through a Stephen McGinn shot which drew a good save from Mark Ridgers. Jack Baird and Gavin Reilly also threatened before the Buddies deservedly went ahead when Lewis Morgan, found by Reilly, drilled a left-foot shot low into the net.
An incredible 14-minute spell after the break saw five goals as Saints eventually took a grip on proceedings.
They were pegged back when John Baird fired home from close range only for Gregor Buchanan to head the home side back in front.
Liam Polworth’s firm shot drew Caley level again but two goals in as many minutes turned the game in favour of the Paisley side.
Cammy Smith restored their lead with a raking low shot before Ian McShane fired in a spectacular drive that soared high into the net.