Marius Zaliukas and Bilel Mohsni made up for a shaky defensive display by netting goals that helped Rangers twice come from behind to beat Queen of the South 4-2 at Ibrox.
Zaliukas cancelled out Gavin Reilly's opener when he headed home but his mistake allowed Queens to regain the lead through Iain Russell.
David Templeton finished brilliantly to level the scores within a minute of coming on as a half-time substitute and Mohsni headed Rangers in front in the 64th minute.
And Kenny Miller made sure of Rangers' third Scottish Championship victory four minutes from time when he notched the first goal of his third spell at Ibrox as he made his comeback from a hamstring injury.
Rangers had dominated possession and territory in the opening quarter but rarely threatened to get in behind or round the outside of the visiting defence.
And the Doonhamers, who were missing six injured first-team players along with the suspended James Fowler, shocked the 31,851 crowd in the 22nd minute by carving the home side open with just two passes.
Centre-back Mark Durnan played a ball up to the right to Dan Carmichael and the winger's pass inside found Reilly in yards of space inside the box. The striker guided the ball into the corner of the net past Steve Simonsen.
The shock jolted the home team into life and strikers Nicky Clark and Kris Boyd both had efforts on goal, the former shooting just wide from 22 yards and the latter forcing a save from a tight angle.
The hosts were level after Lewis Macleod's 27th-minute corner. The delivery found its way to Darren McGregor at the back post and his shot rebounded to Zaliukas after Zander Clark's point-blank save.
The Lithuanian's header somehow looped in despite Clark and two defenders guarding the net, with Boyd doing his best to unsettle them.
Boyd had a shot saved at the near post after good movement to meet a throw and McCulloch sliced a shot wide after another Macleod corner.
But Rangers fell behind again in the 36th minute. Zaliukas missed a header following a throw-in near the halfway line and Reilly slipped the inside for Russell, who had ample time to control the ball and steer it into the bottom corner.
Queens finished the half on top and Derek Lyle had a sight of goal when he breezed past Mohsni but could not get hold of his shot, which failed to find the target.
Ian Black and Templeton were half-time changes for Zaliukas and Arnold Peralta and the winger levelled after Macleod's pass to Boyd had put the visitors on the back foot.
The forward helped the ball on to Templeton and left-back Kevin Holt's slip allowed the winger to line up a shot and he blasted a 20-yard strike into the top corner with his left foot.
Rangers, with Lee McCulloch dropping into the back four in place of Zaliukas, began to exert some pressure and it paid off when Mohsni met Nicky Law's corner and guided a header that squirmed underneath Clark and into the net.
Lyle headed just over but got injured in a clash of heads with Mohsni in the process, forcing him off as Dean Smith came on.
Lewis Kidd also came close from distance but the Dumfries side could not mount a sustained comeback and Rangers came closer to scoring through Templeton and Law before Miller settled matters.
The striker, on for the injured Templeton, ran on to Boyd's header on following a kick-out by Simonsen and lifted the ball over the advancing Clark.
Why are you making commenting on The Herald only available to subscribers?
It should have been a safe space for informed debate, somewhere for readers to discuss issues around the biggest stories of the day, but all too often the below the line comments on most websites have become bogged down by off-topic discussions and abuse.
heraldscotland.com is tackling this problem by allowing only subscribers to comment.
We are doing this to improve the experience for our loyal readers and we believe it will reduce the ability of trolls and troublemakers, who occasionally find their way onto our site, to abuse our journalists and readers. We also hope it will help the comments section fulfil its promise as a part of Scotland's conversation with itself.
We are lucky at The Herald. We are read by an informed, educated readership who can add their knowledge and insights to our stories.
That is invaluable.
We are making the subscriber-only change to support our valued readers, who tell us they don't want the site cluttered up with irrelevant comments, untruths and abuse.
In the past, the journalist’s job was to collect and distribute information to the audience. Technology means that readers can shape a discussion. We look forward to hearing from you on heraldscotland.com
Comments & Moderation
Readers’ comments: You are personally liable for the content of any comments you upload to this website, so please act responsibly. We do not pre-moderate or monitor readers’ comments appearing on our websites, but we do post-moderate in response to complaints we receive or otherwise when a potential problem comes to our attention. You can make a complaint by using the ‘report this post’ link . We may then apply our discretion under the user terms to amend or delete comments.
Post moderation is undertaken full-time 9am-6pm on weekdays, and on a part-time basis outwith those hours.
Read the rules hereComments are closed on this article