Hearts went top of the cinch Premiership but it was the Dundee fans who were celebrating at Tynecastle after Jason Cummings headed a late equaliser.
John Souttar curled home an impressive 20-yard effort to put Hearts ahead at half-time but they could not really build on their lead, although they hit the frame of the goal for a second time after the interval.
The hosts kept Leigh Griffiths quiet but it was another former Hibernian striker that did the damage in the 1-1 draw in the 83rd minute.
Cummings, a former Hearts youth player, glanced home from close range after meeting Cammy Kerr's long throw and the visitors held on.
Hearts went top on goal difference but Rangers now have the chance to go three points clear when they play St Mirren in Paisley on Sunday.
Tynecastle boss Robbie Neilson watched the action from the front row of the press box, immediately behind the home dugout, after his Ibrox red card led to a three-match touchline ban.
Neilson kept an unchanged team following that draw in Glasgow while James McPake brought in Max Anderson for injured midfielder Shaun Byrne.
Griffiths was the centre of attention as the teams came out and he nearly silenced the home fans when his volley shaved the bar, but the offside flag was raised anyway.
Hearts were generally pushing Dundee back with Ben Woodburn heavily involved in the home side's early play but Craig Gordon made the first save of the game when he held Luke McCowan's shot.
Hearts came closer when Liam Boyce headed Michael Smith's corner off the bar and Griffiths cleared off the line as Craig Halkett followed up.
The hosts took the lead in the 37th minute after Charlie Adam's attempted nutmeg failed to come off midway inside his own half.
The ball fell for Boyce, whose shot was blocked and the ball was eventually rolled back to Souttar, who sent a curling first-time shot away from the goalkeeper and into the top corner.
Dundee almost got caught again before the break when Barrie McKay won the ball inside the visitors' box and cut it back for Boyce, whose shot was blocked.
Gary Mackay-Steven replaced Woodburn at half-time and Boyce limped off for Armand Gnanduillet on the hour - but Hearts remained on top. The first substitute soon hit the post on the rebound after teeing up Smith.
The second biggest cheer of the day from the Hearts fans came when Griffiths was substituted in the 69th minute. His replacement, CiIlian Sheridan, forced a decent stop from Gordon when he let fly after a long ball.
With only one goal in it, Dundee grew in belief and Cummings came back to haunt Hearts when he nodded into the far corner of the net.
The equaliser sparked some tense moments behind the goal as some of the celebrating visiting fans moved towards the home support and missiles were thrown.
With McKay off for Josh Ginnelly, Hearts had an all-new attacking trio and they could not force a clear chance to get a winner.
What the managers said...
Hearts boss Robbie Neilson: "If you look at the bigger picture, we are sitting top of the league after 10 games.
"Yes, we are disappointed not to have taken maximum points after the way we played and the amount of chances we created but I can't fault the players for their effort and the way they tried to win.
"But when you are 1-0 up and you don't get the next goal, you are always susceptible to losing one."
Dundee manager James McPake: "I don't think it helps that opposition managers are coming out and saying it's going to be a white hot atmosphere. We already know there's going to be 20,000 fans in here. Leigh is already a target, we know that.
"He will go to the fact there was a voting scandal. But we have played them three times since and he was the manager of Dundee United at the time of the vote. I don't think there was a need to say what he did. Maybe he should concentrate on his own team.
"Yeah he's got to try and get his own fans up for it but you are at Tynecastle with the chance to go top and I don't think certain comments help the situation with Leigh. It's stoking the fire.
"I didn't like it but I can only concentrate on Dundee and the wellbeing of our players. I want Leigh Griffiths the footballer to be enjoying playing football, which he is at Dundee."
Hearts travel to St Johnstone, while Dundee host Ross County, with both Scottish Premiership games kicking off at 7.45pm on Wednesday.