Dean Shiels created a goal and scored himself inside two second-half minutes and Montrose were twice denied late equalisers by the frame of the goal before Robbie Crawford secured the points with virtually the last kick of the ball.
Shiels set up Kevin Kyle to put Rangers ahead midway through the second half and then finished off a clinical break to seemingly end the visitors’ struggle against Montrose, who led for six minutes through Lloyd Young’s strike before Lee McCulloch netted a penalty.
But home substitute David Gray soon scored a wonderful lob and Garry Wood and Scott Johnston both hit the woodwork.
The hosts stunned Ally McCoist’s men in the 16th minute when Young ran unchecked on to Stephen McNally’s long throw and dispatched a cushioned first-time volley into the bottom corner from 10 yards.
The Ibrox side did not have long to wait for the equaliser though and it was a cheap give-away by Montrose when McNally made an ill-advised tackle on David Templeton in the box. Centre-back McCulloch sent Wood the wrong way for his 17th goal of the season.
McCoist brought on Barrie McKay for Templeton in a bid to find a much-needed cutting edge after the break, but the 67th-minute breakthrough came from a scrappy piece of play.
Hutton and Shiels got in each other’s way on the edge of the box and Rangers appeared to have lost their chance but the Northern Ireland international got up and steered the ball into the path of the unmarked Kyle to shoot into the bottom corner from 16 yards.
McCoist’s men had some breathing space two minutes later. Hutton helped the ball on to McKay on the left after a Montrose set-piece had been cleared and the teenager ran 60 yards before releasing the ball for Shiels, who guided the ball into the far corner.
But Montrose refused to lie down and substitute Gray got them back into it with a goal out of nothing in the 76th minute, latching on to Leighton McIntosh’s lay-off and guiding a first-time effort with the outside of his right foot over the head of Alexander.
The hosts came so close to levelling moments later when Wood lobbed Alexander but the Rangers goalkeeper this time turned round to see the ball hit off his bar and fall into his arms.
Wood saved well from MacLeod but Montrose were again denied by the frame of the goal when Scott Johnston volleyed off the inside of the post from 12 yards following a free-kick into the box in injury-time.
Rangers soon restored their two-goal lead following another break when Crawford took his time to make space and guide the ball in off the post after Wood had saved from McKay.