A review of Saturday's action in the Clydesdale Bank Scottish Premier League.
The 15-point lead Danny Lennon's men once enjoyed over basement boys Dundee has been slashed to just eight, and could be cut to five with two games to play if John Brown's side beat Aberdeen on Sunday.
It was a woeful display from the Paisley outfit as they fell apart after Jamie Walker's opener just 14 minutes in.
Kevin McHattie's free-kick 60 seconds before half-time gave them an uphill task in the second period but a spirited opening five minutes was quickly quelled when Kenny McLean was sent off after barging into the scorer of the second in the box, leaving Jamie Hamill to wrap up the win from the penalty spot.
McKay and Andrew Shinnie struck to put Caley Thistle three ahead inside 27 minutes but Motherwell had scored 15 goals in their five most recent games and 12 against Inverness in three previous meetings this season and they stormed back.
James McFadden hit two goals either side of Michael Higdon's penalty to draw Motherwell level in the 64th minute as they sought the point needed to secure second place.
They looked like they might take all three but Henrik Ojamaa was sent off and McKay atoned for an earlier penalty miss when he fired a close-range winner six minutes from time.
The victory keeps Inverness in pole position to join Motherwell in the Europa League and both sides showed why they deserve their current top-three positions for entertainment value alone.
The Saints midfielder - who has signed a pre-contract with Hibernian - lit up a lifeless opening period in the 38th minute with a fine finish from inside the penalty area.
There was huffing and puffing from both sides in an equally dull second-half but no more scoring with the victory leaving the McDiarmid Park club in fourth place, one point behind Inverness as the race for the Europa League spots enters its final two games.