Rangers ended Hearts’ hopes of claiming third place in the Scottish Premiership as they drew 2-2 to finish the season unbeaten at Ibrox.
Lawrence Shankland headed the visitors ahead in the first-minute as they looked to keep up the pressure on Aberdeen above them.
Todd Cantwell and Fashion Sakala scored either side of half time, as Rangers looked to win on Allan McGregor, Alfredo Morelos and Scott Arfield’s final Ibrox appearances.
Substitute Garang Kuol scored a stoppage-time equaliser for Hearts, who need to avoid defeat to Hibs in their final game to secure a place in the Europa Conference League qualifiers.
Rangers, who will be runners-up behind Celtic, finish their season with a trip to St Mirren on Saturday but already planning is under way for next term.
Rangers unbeaten at Ibrox
The Light Blues announced before the game that 25-year-old midfielder Kieran Dowell would be joining the club from Norwich.
The club also asked fans to stay behind to pay tribute to McGregor, Morelos, Ryan Kent, Arfield and Filip Helander, all of whom will leave in the summer.
McGregor and Morelos started the game but ideas that it would be simply a sentimental night of reflection ended within seconds, following a long throw into the Rangers penalty area from Hearts defender James Hill.
Jambos midfielder Peter Haring helped it on, Rangers skipper James Tavernier tried to clear, but the ball fell for Shankland whose header hit team-mate Josh Ginnelly and rebounded for him to bundle over the line from two yards.
After a long VAR check referee John Beaton pointed to the centre circle and Hearts were officially in front.
Minutes later Haring sent Ginnelly through and his drive after turning defender Leon King was beaten away by McGregor.
It was not the start the home fans expected and the Rangers reaction was hesitant.
Hearts keeper Zander Clark had to deal with King’s long-range drive which deflected off Hill and Nicolas Raskin’s thunderbolt from distance before tipping a Sakala drive on to the post and behind.
Jambos interim boss Steven Naismith, a former Rangers striker, was booked for throwing on a ball to waste time just before the interval but there was time for Cantwell to get the break of the ball off Hill to run through and confidently slot the ball past Clark, with Morelos carrying on a feud with Naismith that had lasted a few minutes.
Two minutes after the restart Sakala took advantage of a slack header by defender Toby Sibbick at the edge of the box to squeeze the ball past Clark, with the backtracking Hill unable to keep it out.
In the 64th minute Arfield got a huge cheer from the home fans when he came on as substitute along with Rabbi Matondo, with Glen Kamara and King making way.
Arfield’s curling shot from the edge of the box in the 73rd minute was pushed behind by Clark and the visitors survived the corner, albeit they seemed to be running out of belief.
Arfield had a shot from six yards blocked by Clark before Cantwell fired the rebound wide of the target.
Morelos got his acclaim when he was replaced by Scott Wright and the home side spurned more opportunities as the game fizzled out, only for Kuol, on for Alan Forrest in the 83rd minute, to pounce at the end to spoil the party.
Beale: It was an emotional night at Ibrox
Rangers boss Michael Beale:
“Crazy first minute, crazy last minute. In between that we played some good football. In the first half you could see they were up for it in every tackle, there were a lot of stoppages in the game and a bit of time-wasting as well.
“You could see what it meant for them.
“We then scored a fantastic goal on half-time which was just about right and I thought second half we dominated the game. We got ourselves 2-1 in front and we missed numerous good chances, with our last pass letting us down.
“We just got a little bit loose there at the end but it’s been an emotional evening and a strange evening as you saw with the fans and one or two players.
“We go away with an unbeaten home league record. We are going to need one next year and pick up a few more points away from home if we are going to be where we need to be.”
Naismith: We gave them cheap chances
Hearts boss Steven Naismith:
“It was entertaining. It was a mixture of emotions because there were some really good moments in the game for us but then we conceded two really soft goals.
“It’s really disappointing because we’ve not had to ask them to make hard decisions to break us down or create with great chances. We gave them cheap chances and they took them.
“The positive part is that we came with a style of play, we tried to play in that way we were disciplined out of possession. I felt we were brave throughout the 90 minutes but just lacked that cutting edge and went right to the end.”
What’s next?
Rangers’ final Scottish Premiership game of the season is away to St Mirren on Saturday, while Hearts host Hibernian.
Both matches kick off at 12.30pm.