Hibernian inflicted Rangers' fourth successive Scottish Premiership defeat as Dane Scarlett struck in the 90th minute to secure victory at Ibrox.
The visitors - in the hunt for a guaranteed Conference League spot - took an early lead through Martin Boyle, with Thelo Aasgaard levelling just before the break.
Rangers enjoyed plenty of possession but showed little quality and, just as the match appeared to be drifting towards a draw, Scarlett snatched victory.
Rangers have now lost four top-flight games in a row for the first time since 1983, while Hibs cut the gap on fourth-placed Motherwell to one point with the sides meeting on the final day in a straight shootout for fourth place.
Reeling from successive post-split defeats at the hands of Motherwell, Hearts and Celtic that dynamited their title challenge, Rangers were caught cold inside four minutes.
Jordan Obita floated a cross in from the left and Boyle nipped in behind a static defence to volley home from 10 yards.
Rangers started to take control as the half wore on and Hibs had goalkeeper Raphael Sallinger to thank for saves from Aasgaard and Youssef Chermiti, as well as a wonderful stop to clawed away Connor Barron's volley.
However, there was nothing Sallinger could do when Aasgaard thrashed a free-kick from the edge of the box to level things up just before half-time.
Rangers enjoyed plenty of the ball after the break, but lacked the quality in the final third to find a way through the Hibs defence.
They were almost made to pay when a rare Hibs counter caught them short at the back, and only a terrific double save from Jack Butland prevented substitute Scarlett and then Felix Passlack grabbing an unlikely winner.
The duo were not to be denied as Passlack drove to the bye-line and fired across goal for Scarlett to bundle home from close range to send the away fans wild.