Hearts cast aside their relegation fears to stun Rangers 1-0 in a frenetic, controversial Scottish Cup quarter-final at Tynecastle.
The first half was dominated by questionable refereeing decisions, but the team bottom of the Scottish Premiership took a deserved lead on 57 minutes through Oliver Bozanic, after Rangers captain James Tavernier sold goalkeeper Allan McGregor short with a back-pass.
George Edmundson spurned two glorious chances to equalise for Rangers, as Hearts stood firm late on, with substitute Clevid Dikamona, who had replaced the injured John Souttar, a colossus in defence.
Referee Steven McLean ignored seemingly clear penalty appeals for both teams, and was lenient with Loic Damour and Ryan Jack, who might both have seen red before halftime, but Hearts were relentless in their desire and never allowed Rangers to settle.
For Daniel Stendel, this was a second triumph over Steven Gerrard in just over a month after a 2-1 victory in the league here in January. Since then Hearts' league position has become perilous, but they join Edinburgh rivals Hibernian in Sunday's semi-final draw.
Rangers hopes of domestic silverware all-but over
After a superb Europa League win over Braga in Portugal on Wednesday, Rangers came crashing down to earth in Edinburgh.
Shot-shy throughout, and without Alfredo Morelos due to a breach of club discipline, their hopes of domestic silverware are all but over but yet another season as they trail Celtic by 12 points in the league.
Gerrard had omitted Morelos from his matchday squad after the striker returned home late from a trip to Colombia, arranged due to his suspension in European competition. In his absence, with Florian Kamberi cup-tied and the returning Jermain Defoe only fit enough to be a substitute, Rangers kicked off without a recognised striker; Greg Stewart was supported by Joe Aribo and Ryan Kent, who had grabbed the only goal in Wednesday's Europa League victory in Braga.
Hearts had upset Rangers at Tynecastle in the league in January, and were playing their first match for a fortnight due to postponements, but suffered a huge blow after 15 minutes when Souttar was stretchered off with what looked like a nasty Achilles injury.
It was a scrappy start on a pitch that looked worse than it played, with Lewis Moore's scuffed shot, easily gathered by Allan McGregor, the only attempt in the first 25 minutes. Jack was perhaps lucky to only be booked for a very late challenge on Michael Smith, the first of series of controversial decisions from referee McLean, as Hearts increased the tempo.
McGregor tipped over Naismith's clever header, before Goldson was forced to block a goal-bound effort from Damour. Washington then passed up a glorious chance by spooning a header from Michael Smith's cross over from just eight yards out.
Rangers, lacking a focal point up front, seemed bereft of ideas. It was half-an-hour before they created an opening, Kent sprinting to the by-line and firing a wicked cross across goal, but there were no takers.
Gerrard was then forced into a change as Scott Arfield limped off to be replaced by Sheyi Ojo.
Referee McLean turned down a huge Rangers appeal for a penalty when Kent was blocked by Damour. It looked a straightforward call, but play raged on, to Gerrard's disbelief on the touchline. Jack then thumped a terrific volley just past the far post, but Hearts still had the better of the play, before there was a chaotic ending to the first half.
Naismith chased a through-ball and then screamed for a penalty as Edmundson punched the ball away with his arm. The referee ignored the protests, but from the resulting corner Damour, who had already been booked, raised both hands and executed a volleyball-style flick which sent the ball into the net.
Tynecastle erupted in celebration and Hearts' players headed for the centre-circle, but McLean blew for a free-kick and was then swamped by Rangers players demanding Damour be shown a second yellow card. None was forthcoming, and the officials were chased down the tunnel by a chorus of boos.
Damour had a more legitimate attempt on goal after the restart, but his powerful volley was well-blocked by Edmundson. Rangers had begun to take a firmer grip on proceedings, but they then fell behind after an awful defensive mix-up.
Tavernier's attempted header back to McGregor was short, and as the goalkeeper rushed out to gather, Lewis Moore nipped in ahead to gain possession and cut the ball back from the bye-line to Bozanic, who swept into an unguarded net.
It was no more than Hearts deserved for their tireless endeavours.
Rangers responded by bringing on Ianis Hagi and Defoe, and the Romanian soon blasted a shot just over, after Kent had forced a strong save from Zdenek Zlamal at his near post. Naismith then had a glorious chance to make it 2-0 after Edmundson's sliced clearance sent him through, but his poke under McGregor dribbled past the post.
The visitors piled forward in search of an equaliser.
Edmundson should have levelled the game but passed up two superb chances in a minute, as unmarked, he headed over first Barisic's corner and then Tavernier's pinpoint cross from close range. Aribo then found space on the left with Defoe unmarked in the middle, but Dikamona stretched out a leg to cut out the cross, and the chance was gone.
As Rangers ran out of ideas, Tynecastle exploded with joy and Stendel hugged his coaching staff with delight on the touchline. In less savoury scenes, Zlamal appeared to being hit by a coin late in the second half.
Gerrard looked grim; for all that his team continue to march on in Europe, their inability to look after domestic affairs now places him under massive pressure.