Christmas came a day early for St Mirren as they celebrated a victory over a Rangers side that ended a feisty game with nine men.
Lee Wallace prodded the visitors in front before Lee McCulloch was red carded for elbowing Graham Carey.
St Mirren levelled when Aaron Mooy cracked home a terrific strike and Paul McGowan shot the Buddies ahead.
The home side defended stoutly in the second half and Dorin Goian was sent off late on after a second booking.
Ally McCoist's team remain top of the Scottish Premier League but their lead over Celtic, which was 12 points not so long ago, looks like being cut to just one.
The Glasgow rivals meet at Celtic Park on Wednesday, with McCulloch and Goian now suspended for the key clash.
Rangers made a positive start and Kyle Lafferty shot narrowly wide after racing clear of the home defence.
St Mirren responded with a raking strike from McGowan, which was smothered comfortably by goalkeeper Allan McGregor.
On 11 minutes, Wallace latched on the great pass from Sasa Papac and bundled his way past a falling Marc McAusland before poking the ball beyond Craig Samson to claim his first goal for the club.
The visitors had the ball in the back of the net again when Gregg Wylde's swerving free-kick flew in but referee Steven McLean had blown his whistle after spotting an infringement from McCulloch.
And the Rangers midfielder was shown a red card for swinging his elbow at Carey.
St Mirren were immediately energised by the sending off and McGregor made a great save to keep out Steven Thompson's near post flick from McGowan's corner
Rangers were sitting deeper and deeper as the first half wore on and the home side levelled with a cracking goal after 44 minutes.
A patient passing move ended with Mooy waltzing through a couple of challenges on the edge of the penalty area before lashing a powerful shot beyond McGregor.
A minute later, the busy McGowan raced in behind the Rangers defence to pick up a pass from David Barron and placed a neat finish into the corner of the net.
Rangers substitute Sone Aluko was first to threaten in the second half, with a shot from 18 yards that found the side-netting.
St Mirren defender McAusland then connected with Gary Teale's free kick at the back post but could only nudge the ball wide from close range.
Rangers countered at pace and Steven Davis picked out Nikica Jelavic in the penalty box but the big striker lacked composure and fired wide when one-on-one with Samson.
St Mirren's passing game completely deteriorated as the depleted visitors pinned them back for long spells.
However, Samson was seldom troubled as his team-mates tackled tenaciously on the edge of their penalty area.
On 86 minutes, Rangers were reduced to nine men as Goian picked up his second yellow card for a tug at Gary Teale's shirt.
McGowan had a great chance to add to St Mirren's tally when he took the ball round McGregor but he shot tamely from a tight angle and Papac got back to make a goal-line clearance.
Sorry, we were unable to load match stats, please try again.