Rangers captain Barry Ferguson was sent off two minutes after his side had taken the lead at Hearts to set up an exciting finale at Tynecastle.
Ferguson was dismissed for the second time this season after Jorg Albertz had netted direct from a free-kick.
This match was something of a late season rarity in that both sides have something to play for.
Hearts needed to take at least a point to keep Kilmarnock in their sights, with a Uefa Cup place up for grabs and the Ayrshire club, with a three-point advantage, are currently on course to get it by finishing fourth.
Rangers kicked off needing just a single point to make sure they finished second and therefore qualify for the Champions League.
Hearts made three changes to the side that drew 1-1 at Kilmarnock in their previous game.
Out went Grant Murray, Lee Makel and Andy Webster with Kevin McKenna, Thomas Flogel and Robert Tomaschek replacing them.
Rangers made a single change in the wake of their 3-0 home defeat by Celtic on Sunday, with Billy Dodds dropping out and Claudio Reyna returning.
Hearts started strongly and almost caught Rangers from a free-kick that followed a Albertz challenge on Flogel.
Steven Boyack floated the ball into the box for McKenna to plant an unchallenged header but ended up striking team-mate Andy Kirk, who was offside anyway.
Reyna was hurt early on but was able to continue after treatment.
Rangers' first attempt at goal came from a Tore Andre Flo flick on that Rod Wallace blasted well over on the volley.
Former Rangers defender Steven Pressley snuffed out the visitors' next attack after Albertz had tried to put Wallace through.
At the other end it needed a Lorenzo Amoruso header back to goalkeeper Stefan Klos to prevent Kirk getting the better of Bert Konterman and going clear.
Klos was involved again when McKenna tried his luck from long range and the German had to scramble low to his right-hand post to prevent the ball creeping in.
Rangers' reply almost brought the first goal when Arthur Numan crossed from the left and, although Wallace could not get on the end of it the ball travelled across the box to the onrushing Fernando Ricksen and it needed a good stop by goalkeeper Antti Niemi to thwart him.
But just two minutes later, Rangers were down to ten men, when Ferguson went in hard and late on Pressley, leaving him writhing on the turf.
Referee Hugh Dallas showed the Rangers captain a straight red card.
Already the game resembled the previous Tynecastle game which ended 1-0 to Rangers, who finished the game with nine men, with Reyna and Numan the men sent off that day.
Numan forced Boyack with a late challenge that Dallas missed, but seconds later he fouled Flogel and received a lecture but not a booking.
In the 37th minute Albertz hit the far post from a free-kick again but this time the ball rebounded back to Niemi instead of going in the net.
Then Albertz fired just wide from open play with his fearsome left foot.
Despite being a man down Rangers finished the half on top and caught Hearts by surprise when a long ball from Ricksen saw Amouroso charging into the box and he fired a good chance across goal and wide.
Just before the break Ricksen won a corner that Albertz curled into the danger zone and Hearts were amazed to see it bounce off the woodwork again this time off the crossbar.
Colin Cameron fired the last shot of the half, a low, long range effort that Klos dived to save.