Last updated on .From the section Scottish Premiership

Alfredo Morelos scored a late winner as Rangers came from behind to beat St Johnstone and move within a point of Scottish Premiership leaders Celtic.

The Colombia striker took his tally for the season to 19 with just two minutes to play, volleying in James Tavernier's teasing delivery.

It earned Steven Gerrard's side a fourth win in a row at McDiarmid Park.

Morelos' downward header from a Glenn Middleton cross had cancelled out Matty Kennedy's thunderous first-half opener.

This was the first time in six games the Ibrox side had scored more than once, with the second-half introductions of Middleton and Kyle Lafferty swinging the game in Rangers' favour.

A win would have moved St Johnstone into fifth place, but a second consecutive defeat after an eight-game unbeaten run instead leaves the Perth side eighth.

Jekyll and Hyde Rangers

For all the praise Rangers have received under Gerrard - and having recently topped the table - they arrived in Perth having only won one of their past five games, scoring twice.

A lack of creativity from central midfield has been a problem and, with Ovie Ejaria returning to Liverpool, their resources were further stretched by the absence of Scott Arfield and Ryan Jack. It showed.

St Johnstone manager Tommy Wright decided to crowd that area, with two midfielders starting in place of two forwards and Kennedy playing as a lone striker - hardly surprising considering they had shipped seven goals in their past two games against the visitors.

The plan could have been undone within four minutes had Andy Halliday not side-footed wide after stealing in, and Joe Worrall and Morelos went close as Rangers saw more of the ball.

However, St Johnstone were growing into the game, with Murray Davidson lofting a shot just over, and Liam Craig should have done better than head wide from close range. That swelling confidence was fuelled by the tendency of Rangers' two centre-backs to cheaply concede possession.

Minutes after Lee Wallace replaced the injured Borna Barisic to make just his second appearance in 15 months, the left-back went missing as Kennedy gathered a cross in plenty of space at the back post, turned inside flailing Rangers bodies and fired his sixth goal of the season high into the net.

Gerrard threw on winger Middleton and striker Lafferty after the break, and it was the former who supplied the cross that found Morelos stealing between two defenders to head his 18th goal of the campaign.

The Jekyll and Hyde nature of Rangers contributed to an exciting finale. Their defensive frailties were exposed with a Kennedy drive curling just wide and Allan McGregor having to beat away a Blair Alston drive. Meanwhile, their potent attack came to life as Zander Clark saved well from Daniel Candeias, Lafferty and Morelos.

Contrasting fortunes within a matter of seconds decided the game. Alston headed just over from a Richard Foster cross after an incisive break and Rangers raced up the other end, with Morelos finishing after being picked out by Tavernier.

Rangers players and management had gone into the game talking about targeting a three-game winning run finish to the year. They remain on course, but to earn victories over Hibernian and Celtic they will have to address their deficiencies after coming so close to falling at the first hurdle.

Matty Kennedy, third right, lashed in his sixth goal of the season to give St Johnstone the lead

'Lafferty & Morelos make difference' - analysis

BBC Scotland's Brian McLauchlin at McDiarmid Park

Wright set out his stall from the outset, with Kennedy given the unenviable task of lone striker against the substantially taller and more physical Rangers defence. His work-rate, however, was phenomenal and he deserved his goal and the standing ovation he received when he was replaced.

St Johnstone will play worse and win games and they should also head into the latter part of the campaign with a positive outlook.

Credit though has to be given to Gerrard. The Rangers boss' decision to send on Lafferty just 10 minutes into the second half was the turning point of the match. Until then, the Ibrox outfit looked laboured.

Morelos, though, scored two of the most clinical finishes you will see. His value to the Ibrox club is immense and, if Rangers are to maintain the pressure on Celtic into the second half of the season, he will be required to maintain his scoring rate.

'We were awful. I let them know' - reaction

St Johnstone manager Tommy Wright: "We haven't defended two crosses, so the manner of the goals are disappointing, but not the manner of the performance.

"I can't praise them highly enough. We were controlled and had the balance right throughout the game between defence and attack. That's the standard they have to maintain."

Rangers manager Steven Gerrard: "Glenn Middleton was excellent and gave us an assist, a fantastic ball. And Kyle Lafferty was a constant thorn in their side and could have had a couple himself.

"From the first day of the season until now, Alfredo [Morelos] been incredible for us and you've seen the quality today quite clear - two top-class finishes."