Inverness gave captain Carl Tremarco plenty to celebrate on his 200th appearance for the club as they beat Dunfermline 2-1 in the Ladbrokes Championship at East End Park.
Caley Thistle took the lead after 23 minutes when Aaron Doran's free-kick from 20 yards hit the crossbar and bounced down over the line.
Inverness keeper Mark Ridgers pulled off a fine save to deny Thomas early in the second half but the Dunfermline player grabbed the equaliser with 20 minutes remaining with a shot from 25 yards.
Tom Walsh restored Inverness' lead seven minutes later with a deflected shot as the visitors secured a victory that moved them three points clear of third-placed Dundee in the table.