Rangers recorded the victory they so desperately wanted, but the result was in doubt until the final minute of injury time when substitute Kris Boyd scored their third.
The home team had taken the lead just before half-time through Daniel Cousin, but Motherwell passed up four gilt-edged chances at the start of the second half before Paul Quinn deservedly equalised.
It was harsh justice on the visitors when Jim Paterson turned the ball into his own net and Rangers remained on edge until Boyd's late goal.
It was a subdued start to the game with neither keeper tested until Stephen Hughes struck a shot which was gathered by Allan McGregor.
Chris Burke, who was restored to the starting line-up after a long absence, then responded with a fine run which ended with his shot going narrowly over.
Motherwell went close when Ross McCormack's close-range header was blocked by McGregor's knees without the keeper knowing too much about it.
Rangers stepped up the pressure as half-time approached. From Burke's corner Carlos Cuellar's effort crashed against the underside of the bar and Steven Naismith turned the rebound wide.
However, Rangers' opener was not long delayed. After Stephen Craigan cleared Barry Ferguson's near post flick off the line, Charlie Adam passed to Steven Whittaker whose cross was turned home by Cousin.
Well passed up a string of chances after the break. McCormack drove into the box but Cuellar intercepted his cut-back to the unmarked Steven McGarry who would surely have scored.
Stephen Hughes' pass put McCormack through only for McGregor to block the striker's shot. David Clarkson then headed over Phil O'Donnell's cross from only six yards before Motherwell equalised.
McCormack's corner eluded everyone at the near post and Quinn was able to head home from only a couple of yards.
From Burke's cross Cousin headed against the bar before Rangers restored their lead in similar fashion to Motherwell's goal. Adam's corner somehow made its way to the back post where Patterson could only turn the ball into his own net.
Well nearly equalised again, but McCormack's free-kick from 25 yards shaved the post.
Rangers' third came when Thomas Buffel did well to turn the ball back to Burke, who unselfishly passed to Boyd and the striker made no mistake from ten yards.