Rangers manager Steven Gerrard was sent to the stand before Alfredo Morelos’ late winner at Livingston moved his side within four points of the Scottish Premiership title.
Gerrard was sent off at half-time for comments to referee John Beaton, who booked Morelos for going down under a challenge from Max Stryjek.
The visitors pushed for a winner but it looked like the hosts would hold firm.
Morelos scored with three minutes left however to put Rangers closer to glory.
The result means Rangers will be crowned champions if they beat St Mirren at Ibrox on Saturday and Celtic drop points at Dundee United the following day.
As for Livingston, they remain fifth but still have a game in hand to extend the one-point gap between themselves and sixth-placed St Mirren.
The hosts started in their usual industrious fashion, pouncing on loose balls while preventing Rangers from getting a grip early on, as both Scott Pittman and Gavin Reilly tried their luck with tame efforts.
While Gerrard’s side enjoyed the majority of possession as the half wore on, they struggled to create anything of note as Livingston remained disciplined in their defensive shape. In fact, the visitors failed to register a single shot in the opening half hour.
Instead, it was Sunday’s defeated League Cup finalists who looked the more threatening as slack defending from Filip Helander resulted in Scott Robinson sliding a ball back to Jason Holt, but the Swede recovered well to block the effort.
The game began to spark into life as Rangers saw their first glimmer of the home goal. Joe Aribo got himself to the bye-line before his attempted cut-back was turned behind by Stryjek, then Helander powered over an outswinging Borna Barisic corner.
It was then the opposing left-back’s turn to whip in a dangerous ball of his own, as Jullien Serrano bended in a teasing cross towards Robinson, who failed to get enough on the finish to divert it towards goal.
Then came the drama. Morelos found himself in behind the Livingston backline before knocking the ball past Stryjek. The goalkeeper appeared to catch the striker with an arm, sending him tumbling, but referee Beaton judged the Colombian to have dived and showed him a yellow card.
Scott Arfield then passed up a glorious chance, as a low cross from Ryan Kent took a nick before breaking back towards the midfielder, who rolled a right-footed finish just passed the post.
The Morelos decision clearly riled Gerrard, with his protests to Beaton as the teams went off at the break resulting in two yellow cards for the Rangers manager and a seat in the stand for the second half.
Gerrard was on his feet early in the second half though, as Connor Goldson headed home from a deep free-kick – but his celebrations were cut short as the centre-back was marginally offside.
The hosts still posed a threat as a wicked Josh Mullin ball dropped just short of Robinson but the league leaders continued to press as Morelos again found himself in on goal, this time forcing Stryjek down to his right to save.
Morelos continued to pose the biggest danger and was a constant option in behind the Livingston backline as twice he drilled wide across goal before failing to divert a close-range header on target.
However, the striker would get the goal his performance deserved after 87 minutes, tapping in to spark wild celebrations after Stryjek pushed away a Steven Davis strike.
Man of match – Alfredo Morelos
What did we learn?
No one is learning anything new by saying that this Rangers side are relentless, but their record is quite frankly ridiculous.
Taking 85 points from 92 on offer is a truly staggering return, and factor in 23 clean sheets and nine goals conceded from 31 games to the equation too and we really are watching one of the best top-flight teams Scottish football has seen in modern times.
Morelos also appears to be hitting his best run of the season. He has now been directly involved in 12 goals in his last eight games – scoring six and assisting six.
Livingston came within minutes of holding Rangers to a second goalless draw of the season, but having won 11 of his first 14 games in charge, Martindale is now without victory in five.
The West Lothian club still sit in fifth, which would be a remarkable achievement in Martindale’s first season. The Livingston manager has spoken about pushing for fourth but, with just eight games remaining and eight points between themselves and Aberdeen, time is running out.
Rangers continue their charge towards the Premiership on Saturday (15:00 GMT) as they host St Mirren, while Livingston travel to Motherwell on the same day.
- 32StryjekBooked at 81mins
- 2DevlinBooked at 51mins
- 27GuthrieBooked at 6mins
- 12SerranoBooked at 71mins
- 18HoltBooked at 66minsSubstituted forLawsonat 68’minutes
- 10SibbaldBooked at 48mins
- 20ReillySubstituted forRobinsonat 23’minutesSubstituted forTiffoneyat 75’minutes
- 1McGregorBooked at 90mins
- 37ArfieldSubstituted forIttenat 73’minutes
- 20MorelosBooked at 37mins
- 14KentSubstituted forZunguat 90+1’minutes
- John Beaton
Match ends, Livingston 0, Rangers 1.