Davie Weir lost his bearings a bit and headed the ball up in the air. Allan McGregor should have come to claim the ball but changed his mind and suddenly Proctor was in front of Weir.
The veteran defender pulled him down, he was sent off and Ian Black tucked away the penalty.
The Rangers fans could not believe their eyes and with Celtic winning at Rugby Park Rangers were thrown off top spot.
It was a dreadful night but it had looked ominous from the outset given the lack of cutting edge or creativity.
It is hardly breaking news that Rangers can find it hard to break down teams at home when they come and sit in as tightly as Inverness did and one word summed up the first half – frustration.
Predictably, Rangers had lots of the ball and passed it well enough but, faced with what seemed like a wall of black and red, they could not find a way through.
Things might have been different had Kris Boyd done better when Steve Davis slid a great ball through with barely a minute played.
Boyd, normally so deadly in this situation, failed to control the ball let alone get a shot away and the chance was lost.
John Fleck whipped in some decent crosses from the left and Davis and Ferguson were industrious but Caley defended very well.
Rangers did have the ball in the net but Kenny Miller was flagged for offside before he collected the ball.
Curiously, the closest things came from the unlikely source of Sasa Papac.
He fooled ICT keeper Ryan Esson with a cross-shot from the left which Grant Munro had to clear off the line in 19 minutes.
And then he forced Esson into a very decent save at his near post, latching onto Davis’s excellent diagonal ball in 43 minutes.
The pattern changed little in the second half. Rangers dominated possession but found it well night impossible to cut their way through the Highland ranks.
Rangers buzzed around the Inverness box but there was no sting with the final pass invariably letting them down.
Madjid Bougherra looked to have opened them up with a great ball for Kirk Broadfoot but his low cross was too near Esson who gratefully scooped it up.
Ferguson surged forward a minute later and released Miller down the left. His cross was met by Boyd but the striker’s header was easily stopped by Esson.
By this point Kyle Lafferty had come on for Mo Edu and he was followed Stevie Naismith – on for Fleck – as Rangers desperately sought the goal they needed.
However, the pattern remained the same – no end product.
The final switch was Aaron for Miller and Rangers continued to press.
However, as if drawing the match would have been bad enough result Rangers incredibly lost it in injury time in extraordinary circumstances.
They gave away a penalty, lost Davie Weir to a red card and then Ian Black scored to the utter horror of the Ibrox crowd.
Having climbed to the summit of the SPL two weeks ago, Rangers are now chasing again with 10 games to go.