Colin McMenamin fired an equaliser for Livingston against Rangers that means Celtic can clinch the Scottish title if they beat Kilmarnock on Sunday.
Colin McMenamin (centre) scored the equaliser
Striker Michael Mols fired Rangers into the lead as they sought the win that would clinch a place in the Champions League qualifiers next season.
Rangers keeper Stefan Klos had made several good stops as Livi sought the win necessary to finish in the top six.
McMenamin eventually broke through to slot in his second goal in two games.
On-loan Celtic striker David Fernandez had returned to the Livingston line-up after missing the Scottish Cup semi-final defeat by Rangers' Glasgow rivals.
A curling cross from the left from Lee Makel took a deflection before whistling just past Stefan Klos' far post as Livi threatened early.
David McNamee got the better of Paolo Vanoli in the box, but after the Livi man had cut inside from the right he spoiled that good work with a weak shot that Klos was able to get behind low at his near post.
Rangers' first chance of the game came in the 19th minute when Steven Thompson got the better of Andrews as the two tussled for a bouncing ball in the box, but the striker could only loft the ball into the arms of goalkeeper Roddy McKenzie.
Mols fired Rangers into a 24th-minute lead.
Vanoli's in-swinging corner from the right was retrieved by Gavin Rae, Thompson was able to head down the resulting cross for Mols to lash home acrobatically in fine style.
Derek Lilley had taken a knock and was replaced in the 29th minute by Colin McMenamin.
Michael Mols gave Rangers the lead
Jamie McAllister fired an effort from outside the box fizzing wide as Livi sought a way back into the match.
Klos was required to make another near-post save, this time from Rubio.
Ronald de Boer fired a free-kick inches over the bar after the break.
Makel won a 61st minute corner that saw him cross for Andrews right in front of goal in the six yard box. It was a glorious chance but the big man headed over.
Substitute Jon Paul McGovern swung in a cross that Burton O'Brien headed just wide.
But Rangers' reprieve was short-lived, when McMenamin, who also came off the bench to score the consolation goal in the Scottish Cup, converted Livi's next opportunity with aplomb.
There was still time for Mols to miss a great chance to win it for Rangers when he fired at McKenzie.
Livingston: McKenzie, Rubio, Andrews, Dorado, McNamee, Makel, O'Brien, McLaughlin, McAllister, Lilley, Fernandez.
Subs: Creer, McGovern, McMenamin, Brittain, Snowdon.
Rangers: Klos, Hutton, Frank de Boer, Khizanishvili, Ball, Ronald de Boer, Hughes, Rae, Vanoli, Mols, Thompson.
Subs: McGregor, Ross, Burke, Adam, McCormack.
Referee: W Young