Last updated on .From the section Football

Barrie McKay scored the winner as Rangers beat Hearts to secure third spot in the Premiership.

Joe Garner's excellent diving header from Kenny Miller's cross gave the hosts an early lead before Hearts' Prince Buaben was sent off for pulling back Josh Windass when clean through.

Esmael Goncalves squared it after the break but Rangers replied through McKay following keeper Viktor Noring's error.

Hearts pressed for a leveller but were unable to find a way through.

Joe Garner scored his 10th goal of the season to give Rangers a 1-0 lead against Hearts

The victory takes Rangers on to 64 points and they now cannot be overhauled in third spot.

Hearts, meanwhile, remain six points behind fourth-placed St Johnstone, who entertain Partick Thistle at 15:00 BST on Saturday.

End-of-season affair

With a fair few empty seats on show at Ibrox, this one started like a typical end-of-season encounter.

And the Hearts defence looked as though their minds were elsewhere as Rangers hit the front in five minutes thanks to the same combination that won them the game at Partick Thistle last week.

Miller broke down the right and delivered a superb ball into the box, where Garner was left in far too much space to finish with a diving header.

Hearts' Prince Buaben was red carded for hauling down Josh Windass when we has clean through on goal

Garner drew a fine stop from Noring with a close-range left-foot effort after good build-up play.

A poor start became a miserable one for Hearts after 25 minutes when makeshift centre-back Buaben was shown a straight red.

It was almost 2-0 five minutes from the break but David Bates, who was afforded acres of space in the penalty box, could not beat Noring with his header.

Clint Hill then hit the post with a header after rising above the Hearts defence at the back post, with Noring then doing well to clear the ball from his line.

Six minutes into the second half the visitors levelled after a superb counter-attack. Jon Toral gave the ball away in attack and Hearts raced upfield through Bjorn Johnsen, who rode a Jason Holt challenge and squared it for Goncalves to apply a simple finish.

Parity lasted all of 90 seconds, however, and it was a Noring nightmare that gifted the home side the lead.

Hearts' Esmael Goncalves drew Hearts level at 1-1 in the second half

The Swedish keeper punched a harmless James Tavernier cross into the air when he should have caught it, and then failed to catch when he should have punched, with the ball dropping perfectly for McKay to drill it into the bottom corner.

Liam Smith missed a headed chance to level before Johnsen fired straight at Wes Foderingham as the visitors started to string some passes together going forward.

Toral forced Noring into a good save at his right-hand post with a fizzing low drive and Tavernier should have scored with a back-post header as Rangers looked for a third.

Martyn Waghorn missed a one-on-one chance at the death but the home side earned the win that sealed third place.

Shape of things to come?

Rangers fans will have been encouraged by a first-half display that boasted a shape and organisation that has been lacking in recent weeks, while Hearts were all over the place at times, particularly in defence.

Barrie McKay punished Viktor Noring's mistake to give Rangers a 2-1 lead

It was all change after the interval, however, as the 10 men of Hearts went to a back three and looked far more organised and threatening in attack.

That change of shape could be significant as Ian Cathro looks to build for next season, while Ibrox boss Pedro Caixinha will be desperate to see his side translate their first-half performance into a full 90 minutes.

Post-match reaction

Rangers boss Pedro Caixinha: "It is going to be the last working week before a short period of vacation and we return again.

"The working week is ready. I am always working in advance and depending on what is going on, I make some changes after I analyse the game. But it is about winning.

"We want to finish well and until the last moment they are here and I am here, we can think only about winning."

Hearts head coach Ian Cathro: "It was a big day for him (keeper Viktor Noring). He was deserving of the opportunity over a period of time.

"I think he showed some qualities at times. Of course, there's the error in the cross and when you're talking about goalkeepers naturally it's always a bigger headline than the misplaced passes in the build-up.

"Of course there's the disappointment of losing but there's a lot of positives things inside. Today I'm even more convinced that we will be a very good team."