Nine-man Rangers clung on for victory in a spectacle to rival last week's Old Firm derby in incident if not goals. Jorg Albertz's 12th-minute penalty settled matters but not until both Claudio Reyna and Arthur Numan had been ordered off for the visitors.
Incredibly, it was Rangers who had the best of the second-half chances but overall they had goalkeeper Stefan Klos to thank for some breathtaking stops, including an amazing block with his legs at the death to deny Andy Kirk.
All this overshadowed the fact that this was Craig Levein's first match as Hearts chief coach. He will know his side are triers if nothing else.
It took Rangers 12 minutes to take the lead at a stage when the pattern of the game had not yet been established.
Lorenzo Amoruso was the supplier with a long ball over Steven Pressley's head for Barry Ferguson to run on to.
Gordan Petric, one of four ex-Rangers in the home side, came across to cover and committed himself to the tackle.
His snap decision meant there was no room for error and within seconds Ferguson had gone to ground and referee Stuart Dougal was pointing to the spot.
Albertz, the supplier of that late UEFA Cup winner on Thursday, made no mistake from the spot with his trusty left foot this time.
But Hearts, under the new regime, already looked like a more dangerous proposition than in their poor showing at Dunfermline in midweek.
Three times opportunities presented themselves for the home strikers - and three times Stefan Klos denied them.
Gordon Durie, the most illustrious of the four former Ibroxmen, was denied twice in the space of a minute, first when he forced a tip over with a header from Scott Severin's cross and then when, from the resulting corner, Severin saw a shot charged down and the ball fell to him invitingly.
This time a low shot ensued and the German blocked with his legs.
The third chance resembled the latter when Durie and Scott Wilson went up for a header and the ball broke goalside of the last defender for Andy Kirk.
It was the clearest chance of the trio but the youngster found Klos in the way once more.
Then came the fireworks with Reyna getting himself booked twice in a matter of 60 seconds.
The first was for a touchline foul on Grant Murray and the second for use of an arm on Kirk.
Arthur Numan repeated the trick four minutes later when he was booked for a foul on Robbie Neilson and then sent off for complaining.
Yet Rangers hung on with a combination of stout and often desperate defending and Klos' brilliance.
Hearts: Niemi, Pressley, Petric (Milne 75), Fulton, Cameron, Murray, Durie, Severin (Tomaschek 81), Juanjo, Kirk, Neilson. Subs Not Used: McKenzie, Locke, McSwegan. Booked: Murray, Juanjo, Pressley.
Rangers: Klos, Amoruso, Numan, Ferguson, Albertz, Reyna, de Boer, Konterman, Wilson, Flo (Tugay 71), Miller (Dodds 80). Subs Not Used: Christensen, McCann, Ross. Sent Off: Reyna (65), Numan (70). Booked: Konterman, Albertz, Reyna, Numan, Tugay. Goals: Albertz 12 pen. Att: 16,710.
Referee: Stewart Dougal (Glasgow).