Rangers' five-game unbeaten run under Stuart McCall was brought to an end by clinical counter-attacking from promotion rivals Queen of the South.
The defeat prevented the Ibrox side going above Hibernian into second place in the Scottish Championship as Queens rose above Falkirk into fourth.
Derek Lyle volleyed Queens into the lead against the run of play.
Lee Wallace turned the ball into his own net 16 seconds after the break and Gavin Reilly fired in Queens' third.
Both sides began the match with chests pumped full of confidence.
Queens after the weekend win over Hibs, while Rangers were unbeaten in five games since McCall succeeded Kenny McDowall, including Sunday's victory over champions Hearts.
Rangers were in unfamiliar red, but they initially looked perfectly at home on Palmerston Park's artificial surface.
Rangers had the majority of the ball in the first half, pressurising the Queens goal where Zander Clark suffered an injury in the opening minutes after the goalkeeper was clattered by an overzealous Nicky Clark challenge.
Committed, brave and, at times, desperate, the home defence protected the on-loan St Johnstone man.
And Clark proved that he had recovered from the challenge with a back-post leap that saw him turn wide an Andy Murdoch cross-come shot that threatened to loop over the goalkeeper's head.
Lewis Kidd rode a clumsy challenge from Wallace before setting up Lyle, who cleverly flicked the ball up with his left foot and volleyed it with his right into the far corner of Rangers' goal.
The striker's 17th goal of the season inspired Queens and Reilly fired a long-range effort into the arms of goalkeeper Lee Robinson.
However, Rangers were only temporarily knocked out of their stride.
When the two Clarks clashed as they challenged for a Darren McGregor cross, the ball spun wide via the goalkeeper's fist and the striker's shoulder.
From the resulting corner, Kenny Miller's looping header rebounded off the face of the crossbar and Zander Clark had to turn the ball over to prevent a goal being scored off the forehead of his own defender, Chris Higgins.
Queens survived to emerge after the break with immediate attacking intent and Wallace turned the ball into his own net with a miscued attempt at a clearance after Reilly's cross was fired across the face of goal by Kidd.
Rangers' recently restored confidence was rapidly trickling away and it required an ambitious long-range drive from central defender Bilel Mohsni to test goalkeeper Clark.
When substitute Robbie Crawford dallied on the ball, Kevin Holt's defence-splitting pass sent Reilly beyond the visiting defence for a deft finish that put the game beyond the Glasgow side.
Rangers' Haris Vuckic and Kris Boyd had efforts saved, but there was to be no crumb of comfort for Rangers, who remain behind Hibs on goal difference after squandering one of their two games in hand.
In contrast, James Fowler's Dumfries side capitalised on their games in hand over Falkirk to move a point ahead of the Bairns as the race for promotion play-off places took another unexpected twist.
Lineup, Bookings (3) & Substitutions (6)
Queen of the South
- 01 Clark
- 05 Durnan (Hooper - 77' )
- 04 Dowie
- 06 Higgins Booked
- 12 Kidd
- 18 McShane
- 17 Carmichael
- 14 McKenna
- 03 Holt
- 19 Lyle (Pickard - 85' )
- 10 Reilly (Russell - 88' )
Substitutes
- 11 Russell
- 15 Paton
- 20 Atkinson
- 22 Hooper
- 23 Smith
- 24 Smith
- 28 Pickard
Rangers
- 25 Robinson
- 24 McGregor
- 26 Zaliukas
- 03 Mohsni Booked
- 05 Wallace
- 11 Templeton Booked (Crawford - 59' )
- 07 Law
- 34 Murdoch
- 10 Vuckic
- 18 Miller (Hardie - 73' )
- 14 Clark (Boyd - 77' )
Substitutes
- 08 Black
- 15 Boyd
- 21 Crawford
- 22 Shiels
- 31 Simonsen
- 49 Sinnamon
- 52 Hardie