Rangers got their title bid back on track but only after being given the fright of their lives by Livi at Ibrox.

And the victory may have come at a cost as £7m winger Ryan Kent hobbled off just 40 minutes into his second-time-around debut.

That, coupled with Livingston snatching the lead through a 48th minute Steven Lawless penalty could have added up to a disastrous day for Steven Gerrard's men, but they rallied with goals from James Tavernier, Alfredo Morelos and Brandon Barker to collect the points as the visitors ended the game with 10 men after Lyndon Dykes was red carded.

Livingston boss Gary Holt had to rejig his team and formation due to injuries and went with an unfamiliar back four set-up as he tried to come up with a plan to frustrate their hosts.

Rangers had the vast majority of possession as expected in the early stages, but didn't work Livi keeper Ross Stewart in the first 10 minutes, although Morelos should have.

The striker was played in by a cute Joe Aribo flick after good work from Kent but from 16 yards curled his effort over the top.

Scott Arfield did far better in the 20th minute, curling a superb effort from 20 yards off the underside of the bar and with Livingston all over the place, Tavernier's cross from the right should have been buried by Morelos but the Colombian failed to make contact on the six yard line.

Kent's afternoon came to a premature end in the 40th when he pulled up looking distressed and was immediately replaced by Barker.

It was a major blow and it remains to be seen how serious it is.

If the first half was poor for Rangers, the second period threatened to blow up in their faces after just 90 seconds.

Arfield rash challenge on Dykes inside his own box was a penalty all day long and when Willie Collum pointed to the spot, Steven Lawless stepped up to send Allan McGregor the wrong way.

Rangers had to sort themselves out and it was left to captain  Tavernier to lead by example in the 54th minute.

Alfredo Morelos was fouled by Marvin Barkley out wide left and Tavernier's viciously inswinging free kick eluded everyone and ended up in the keeper's bottom left hand corner.

Nicky Devlin then thought he'd given Livi back the lead when he robbed Halliday just inside his own half and ran on to beat McGregor - only to be pulled back for a foul on the full back, who was the most relieved man in the stadium.

The visitors weren't fiinished there, though, as they hit the bar through Chris Erskine's header from Keaghan Jacob's corner a couple of minutes later.

And McGregor was forced into a superb stop from Dykes in the 66th minute, matched at the other end by Stewart's stop from Arfield as the game opened up.

Twenty minutes from time, though, Rangers finally took with a bullet header from Morelos after Aribo had flicked on a Tavernier corner.

Livi's task was made more difficult in the 73rd minute, when Dykes, who had been a thorn in the flesh of the Gers defence, used an elbow on Connor Goldson as they contested a high ball and was given a second yellow card.

And the visitors' resistance was ended in 78th minute when Barker fired a superb shot into the postage stamp corner after being set up by a storming run from Sheyi Ojo.

3 talking points

Relief for Rangers

A big win for Rangers in exactly the kind of circumstances where points were dropped last season. They huffed and puffed for long spells but their quality told in the end.

Kent concern

Ryan Kent was looking sharp considering how long he'd been without first team football but pulling up injured five minutes from the break looked ominous and Steven Gerrard will be praying his £7m man isn't out of action for long.

Lions unlucky

Gary Holt really is working miracles by keeping Livi competitive in the top flight when you consider he lost his keeper, Liam Kelly and two of his back three, Declan Gallagher and Craig Halkett in the summer. Today, the other member of the trio, Alan Lithgow, wasn't available either and yet they stayed in the game for long periods and will be disappointed to come away with nothing.