Hearts 2 Rangers 2
Rangers threw away a two-goal lead to draw 2-2 against Hearts - but in the end a victory would not have been enough for the Ibrox club to secure a runners-up place in the Championship.
Stuart McCall's side were in control against the champions with first-half efforts from Darren McGregor and Kenny Miller.
But Hearts forward Genero Zeefuik came off the bench to notch a brace in the final eight minutes of an absorbing contest.
The away team needed to win to have any chance of finishing second but Hibs' victory at Falkirk ensured it was Rangers that would have to negotiate an extra play-off place in their bid to return to the top fight.
The Glasgow club will take on Queen of the South in the first leg of the play-off quarter-final at Palmerston next Saturday.
Captain Lee McCulloch was a notable omission from the visitor's starting-line-up among three changes made by McCall.
The defender, who was booed by a section of the Ibrox crowd after being at fault for a goal in last weekend's 2-2 draw with Falkirk, had to be content with a place on the bench.
Another defensive lapse just about proved costly for Rangers after five minutes in this game following an error by Richard Foster.
Jamie Walker pounced on the error and was cynically brought down by Haris Vuckic as he raced towards goal. But Alim Ozturk wasted the free-kick opportunity after firing a shot well over.
A better chance arrived five minutes later when Miguel Pallardo pounced on a wayward pass from Vuckic and threaded a great ball through for Walker.
But Cammy Bell spread himself well and forced the winger's shot over the bar from close range.
The hosts continued to do all the pressing and Bell was relieved to see a deflected Pallardo shot come down just past his post.
Hearts supporters appealed for a penalty after 18 minutes when Osman Sow fell in the box in a tussle with Marius Zaliukas but referee Calum Murray booked the Swede for diving.
The visitors offered a glimpse of their attacking threat when Nicky Law curled a ball to the back post for Vuckic but the Slovenian hit a tame effort into the side netting.
But midfielder Law laid a free-kick on a plate for McGregor to give Rangers the lead after 32 minutes. Ozturk felled Dean Shiels at the side of the box and Law's delivery was headed into the net from six yards out.
The first half ended under a cloud of controversy after Miller doubled Rangers lead in the 40th minute just seconds after Sow went down in the box under a challenge from Bell.
The forward latched on to a mistake from Zaliukas and claimed he got to the ball ahead of keeper Bell after crashing to the ground.
Referee Murray waved play on and Rangers broke up the field to score through Miller, with the striker slotting a Richard Foster pass into the net.
Hearts head coach Robbie Neilson apparently took his protestations too far after he was dismissed from the technical area by Murray.
Neilson, however, ended up taking up a position just behind the dugout.
Hearts set about trying to drag themselves back into the match after the break.
Walker had a powerful low drive that was collected by Bell at the second attempt.
Left-back Kevin McHattie then dug out a shot from a tight ankle inside the area that pushed behind by the Rangers goalkeeper.
Rangers should have added a third in the 76th minute but former Hearts skipper Zaliukas headed a Vuckic free-kick just wide at the back post.
That miss came back to haunt Rangers as Zeefuik scored twice in the final eight minutes. The on-loan Groningen marksman's first arrived in the 82nd minute when he headed in a Morgaro Gomis cross.
The Dutchman then forced his way into the box with seconds left to fire a low left-footed shot past Bell.
Hearts returned to the pitch to rapturous applause after the final whistle to be presented with the Championship trophy.