Impressive Motherwell secured their first victory at Ibrox in nine years to end Scottish Premiership leaders Rangers’ 11-game winning run.
Theo Bair’s early strike – his 11th goal of the season – was cancelled out by James Tavernier’s 60th-minute penalty.
But Dan Casey headed the eighth-placed side’s winner that swings the title race back in the direction of Celtic.
Philippe Clement’s side remain two points clear at the top of the table.
However, reigning champions Celtic can regain the lead they enjoyed for much of the season when they visit Heart of Midlothian on Sunday.
Motherwell manager Stuart Kettlewell told BBC Scotland just before kick-off that he felt he had a formula to frustrate both sides of the Old Firm.
His side had lost by a single goal on their last visit to Ibrox and they rarely looked back after making a composed start that was in stark contrast to their surprisingly nervy hosts.
When centre-half John Souttar made a mess of trying to intercept a through ball to Jack Vale, the striker exploited the space behind and set up strike partner Bair for a 15-yard finish off the far post.
Rangers looked shaken and disjointed, but they gradually grew into the game only to find goalkeeper Liam Kelly and his defence in defiant form.
With winger Ross McCausland forced off after a strong Casey challenge that did not even produce a booking, replacement Fabio Silva ought to have equalised with his first touch only to shoot weakly straight at Kelly.
Rangers thought they had equalised, only for Cyriel Dessers to be ruled offside, but they eventually did after Stephen O’Donnell’s slide into Silva produced the penalty from which Tavernier fired his 21st goal of the season off the underside of the bar.
The hosts piled forward hoping to repeat their midweek comeback win over Kilmarnock.
However, Blair Spittal had already fired a warning off the crossbar before Rangers’ equaliser and the hosts’ defensive frailties were again exposed when the midfielder’s cross found Casey to provide the killer blow in a thrilling finish.
Home defeat is not the ideal preparation for Rangers as they travel to meet Benfica in the Europa League last 16 on Thursday (20:00 GMT) before visiting Hibernian in the Scottish Cup quarter-finals, while Motherwell are not in action again until hosting Aberdeen in the league on 16 March (15:00).