Pedro Caixinha’s first visit to McDiarmid Park produced a victory for a much-shuffled Rangers team.
Goals in either half from Kenny Miller and Jon Toral eased the Ibrox club to a win as the manager gave youth a chance.
In a game which was meaningless in terms of league places, the gap between the clubs widened to nine points.
Saints threatened to equalise after Graham Cummins pulled one back but the visitors clung on to take an end-of-season victory.
The visitors’ line-up raised a few eyebrows pre-match as Caixinha made five changes.
He gave a debut to Jak Alnwick in goal and a first start to Jamie Barjonas in the middle of the park, while youngsters Aiden Wilson and David Bates retained their places in central defence.
But his reshuffle worked. Eventually.
The passing was sharp and crisp from both sides on a greasy surface heavily watered by the Perthshire rain, but we had to wait fully 21 minutes for any genuine threat of a goal.
That was from Liam Craig, a searing shot which had Alnwick panicking as it flew just over his crossbar.
It did set an example. Craig Thomson fizzed a low shot across the goal and at the other end Rangers finally threatened to bother Alan Mannus, but Miller blazed over to the frustration of 2,453 visiting fans in a crowd of 6,799.
But before half time – in the 40th minute to be precise – the veteran striker found his shooting boots. And it was a gem of a goal.
Martyn Waghorn won himself space with a cute dummy and powered down the right, awaiting a presence in the box. Miller arrived with perfect timing and met the cross first time to deliver a low shot beyond Mannus for his 14th goal of the season.
But the quality of the goal camouflaged the inadequacies of the first half and the fact that in that 45 minutes St Johnstone were the better team.
That, however, changed after the break. Rangers went two ahead in the 53rd minute and again it was a classy goal.
The finish was a low first time shot from Toral but it was all about James Tavernier. The right wing back produced an incredible dancing, jinking run along the by-line – almost on it like a tightrope walker – and laid it on a plate for Toral.
Rangers looked to have a grip on the game and the three points and that was reflected with a growing confidence from their young centre-halves, who produced a pretty solid performance.
But they did slip up once before the end to allow substitute Cummins to blast home a shot from close in.
And only a wonder save from Alnwick at point-blank range from MacLean denied Saints an equaliser.
At the other end Mannus produced something similarly wonderful to deny Barjonas his first goal for Rangers, who were worth their win.
St Johnstone manager Tommy Wright: “There was only one team in it the first 30-35 minutes. Overall we were probably the better side but that didn’t equate to more goals than the opposition. From our point of view the second goal is far far too easy.
“The performance was good but the result wasn’t what I think the performance merited.”
On his summer plans: “We need to get Danny (Swanson) replaced and get some fresh legs, a bit of pace up front.
“We’re looking at where we’ll really try to strengthen the squad and improve it. We need to do things quickly.
“I’m expecting to be here next season. I have two years left on my contract. I have a great job here and it would have to be the right move for me, because I have such a good club here and I’m happy here. I am ambitious and if something had to come along that ticks all the boxes, it may interest me.”
Rangers manager Pedro Caixinha told Rangers TV: “I was really enjoying watching the game. After 10 or 15 minutes, we understood what was going on. Jon [Toral] and Josh [Windass] coming inside together with Kenny [Miller] created a very good situation for us.
“We were able to keep the ball and we had options to play inside and on the wide area, and it was good. We were understanding the game and enjoying it.
“Now it is the end of the season and it is time to start taking the decisions. We are already going in that direction and in a few weeks’ time we start again.”