Captain Lawrence Shankland kept Hearts firmly on course for Scottish Premiership glory as they all but eliminated one of their two main rivals from contention by coming from behind to defeat Rangers 2-1 at a frenzied Tynecastle.
The Gers arrived in Edinburgh four points off the pace and it looked like they might be about to blow the three-way battle for the championship wide open when they led at the break through Dujon Sterling's deflected effort.
But Hearts, having been outplayed for long periods of the first half, regrouped at the break and turned the game around through goals from Stephen Kingsley and Shankland.
The buoyant Jambos - who have won each of their last three games - are now three points ahead of second-placed Celtic with a superior goal difference and a whopping seven clear of Gers, with just three games remaining of this compelling title race.
Hearts boss Derek McInnes made two changes to the side that started last weekend's 2-1 win at Hibernian as wingers Islam Chesnokov and Alexandros Kyziridis were restored.
There were four changes to the Rangers side that started the 3-2 defeat by Motherwell, with James Tavernier, Mohamed Diomande, Andreas Skov Olsen and Mikey Moore all added.
McInnes said on Friday he wanted to see Tynecastle "in all its glory" for one of its biggest-ever games, and he certainly got his wish as his team emerged to a sea of maroon and white and a cacophony of noise.
The opening 10 minutes were predictably frenetic before Hearts fashioned the first notable chance, with Marc Leonard's free-kick from the left headed over by Craig Halkett.
Rangers threatened for the first time in the 12th minute when Nico Raskin's cross from the left had to be pushed behind by Alexander Schwolow.
The visitors spurned a golden chance in the 19th minute when Tochi Chukwuani sent a free header over the bar from a Tavernier corner.
Gers had been building a head of steam and they silenced the home support in the 23rd minute. Tavernier's long throw into the box was partially cleared by the head of Stuart Findlay, but only as far as Sterling, whose volley from eight yards out deflected off Michael Steinwender and looped beyond Schwolow.
The goal removed the wind from the hosts' sails, and they spent the remainder of the first half treading water as Danny Röhl's team threatened a second.
McInnes responded by sending on Blair Spittal in place of the ineffective Chesnokov for the start of the second half, and the change helped spark the Jambos into life.
Shankland saw a ferocious shot blocked by Emmanuel Fernandes before Claudio Braga forced Jack Butland into his first save of the night after a fluent build-up.
The equaliser came in the 54th minute when Kyziridis cut in from the right and curled a low shot off the far post, with Kingsley perfectly placed to guide in the rebound from just outside the six-yard box.
Hearts' tails were up, and they grabbed the decisive goal in the 71st minute when Spittal released Kingsley down the left and his cutback took a deflection off Tavernier and fell kindly to Shankland, who dispatched an emphatic low left-footed finish beyond Butland, sparking delirious scenes.
Rangers cranked up the pressure in the closing stages and Thelo Aasgard looped a late header against the bar, but Hearts held firm.
Hearts boss Derek McInnes speaking to Your Site:
"We started okay in the game. I thought Rangers were really good for half an hour. Their movement and rotations caused us problems. We didn't lock on. We thought the movement from the middle and top of the pitch spooked us. Half-time couldn't come quickly enough.
"A big talk at the break. We went back to the original system to ask the players to take more responsibility. We're top of the league by taking responsibility better than we did in the first half.
"It wasn't a change of system. It was a change of mindset. Spittal gave us an extra pass as a runner. Our better places started to get on the ball."
On title race: "It's only an advantage [playing before Celtic], if you win your games. It will be the week that decides everything. We just need to concentrate on ourselves. You don't want other people to do your job for you."
Rangers boss Danny Röhl speaking to Your Site:
"This is what we have to improve next season. I think we played good football for 45 minutes. Then we knew in the second half they would come out with more direction. They would play the ball in behind and try to create something.
"Finally, you have to defend as a group better. The goals we conceded were too easy. We were not in the right positions. This is what we have to improve. We cannot just play 45 minutes at the highest level. Football is about 90 minutes, and you have to do a lot of things right to get something here.
"Two shots on target, two goals? The opponent was ruthless, and it put us in the situation where we have to invest so much in coming back. There's no space for the mistakes.
"In the next three games, I demand they do everything. We wear the shirt of this club and it means to show character, personality and courage. Go for nine points and then we will see.
On title race: "It is extremely difficult. Look at the table. You have to take the points in this race and this is what we have to learn."