Joe Garner proved to be Rangers’ last-gasp hero as his stoppage-time winner sealed a 2-1 win over Partick Thistle at Firhill.
Kris Doolan’s first-half opener looked set to hand Jags their first win over Rangers in 24 years.
But for the second time this season, Rangers refused to concede defeat in Maryhill and got their rewards at the death.
Substitute Barrie McKay levelled with seven minutes remaining before Garner’s goal in the third minute of injury time wrapped up the victory, which guarantees Pedro Caixinha’s men will be playing Europa League football next term.
Before the match, the Light Blues support spelled out a stark warning to their team in the wake of last week’s 5-1 Old Firm humiliation by unveiling a banner which read: “Do not wear our badge if you’re not prepared to give everything”.
But there was little sign that those words had been heeded as the Ibrox men were again given the run around during a lacklustre first-half showing.
They did create a couple of early openings but saw Kenny Miller flash a volley wide while Garner ruffled the side-netting after darting across the front post to meet Josh Windass’ cross.
Their 14th-minute opener was the very least the Jags deserved.
That they were helped out by the Gers defence as they left their left-hand flank shockingly exposed was undeniable, but the execution of the move was clinical.
Stevie Lawless did well to keep his head up and spot Christie Elliott galloping free on the wing and switched the play. The full-back then did his part as he threw across a perfect cross for Doolan to bullet home his 15th goal of the season with his head at close range.
The goal dizzied an already anxious Rangers back-line and they were lucky to have keeper Wes Foderingham on his toes as he brilliantly blocked at the feet of Ryan Edwards after the static Myles Beerman allowed the Australian to bundle into the six-yard box.
Elliott then drilled just wide as the angst-ridden travelling support let rip at their befuddled players.
Danny Wilson did nod wide from a James Tavernier free-kick but Doolan should have heaped more misery on the visitors after the break as he miscued a decent headed chance at the back post.
Ibrox teenager Jamie Barjonas was introduced for his first-team debut while McKay was also thrown on - but again it was Thistle doing all the threatening, with Foderingham rescuing his side again as he tipped over Lawless’ header.
However, the Jags will now end the campaign as the only Ladbrokes Premiership team not to have taken points off Rangers this season as they let victory slip through their fingers.
Joe Dodoo was Rangers’ saviour back in November when his two late strikes handed Mark Warburton’s side a 2-1 win.
This time it was McKay who rescued the Light Blues as he collected Foderingham’s punt, lobbed the ball over Elliott and Liam Lindsay before prodding the equaliser past Tomas Cerny with seven minutes left.
And with the clock ticking down, Miller took it upon himself to drag Rangers forward as he darted down the right before throwing over the cross which Garner thudded home with his head.