Hearts recovered from the loss of a man and a penalty equaliser to defeat Aberdeen at a vibrant Tynecastle.
Jamie Walker gave the hosts the lead against the run of play on 18 minutes.
The Dons levelled from the spot through Niall McGinn after a professional foul on Calvin Zola had Kevin McHattie sent off.
But the 10-men struck again with three minutes to go through Jordan McGhee's back-post header following a long ball that Nicky Weaver missed.
Hearts have now reduced their 15-point penalty, for going into administration, to minus eight.
There was a minute's applause pre-match to mark the passing of former Hearts winger Jonny Hamilton and former Dons keeper Fred Martin.
And 2,500 visiting supporters made the trek south to ensure the stadium was packed.
Tynecastle has not been a happy hunting ground for Aberdeen who hadn't even scored here since January 2010.
The Dons had the first sight of goal in the third minute with Scott Vernon -making his first start of the season - beating the offside trap but scuffing his effort straight at home goalkeeper Jamie MacDonald.
Dylan McGowan and Mark Reynolds traded headers that went wide before the Jambos took the lead.
Walker took advantage of a standoffish defence before driving home from 20 yards into the bottom right corner, leaving Weaver helpless.
It was the second week running that the midfielder netted, after rescuing a point at Partick Thistle.
Vernon found himself through again a couple of minutes later, but with the Hearts defence sleeping the Mancunian put his effort wide.
McGinn, Peter Pawlett and two Clark Robertson headers all came and went as the hosts went in ahead at the break.
Dons manager Derek McInnes changed it early into the second half with Vernon hooked for Zola.
It paid dividends not long after as McHattie brought him down in the box - the left-back was sent off and McGinn converted the resultant penalty to make it three goals so far this season.
Pawlett was then booked for diving after a Walker challenge in the box, angering the travelling support.
McInnes went for the win, replacing Robertson with Gregg Wylde, but it was the 10-men who won it three minutes from time.
Weaver came and missed a long free-kick and 17-year-old substitute McGhee headed home his first senior goal.
McInnes and Hearts' assistant boss Billy Brown were sent to the stand in the aftermath before Josh Magennis's effort brought a great save from MacDonald.
Zola was denied a penalty in injury time, meaning the visitors' terrible record in Gorgie continued.
Sorry, we were unable to load match stats, please try again.
Live Text Commentary
Full Time The referee signals the end of the game.90:00 +4:19
Jamie MacDonald takes the free kick.90:00 +4:01
Unfair challenge on Callum Tapping by Gregg Wylde results in a free kick.90:00 +2:53
Mark Reynolds restarts play with the free kick.90:00 +2:48
Unfair challenge on Mark Reynolds by Callum Paterson results in a free kick.90:00 +2:23
Josh Magennis crosses the ball.90:00 +2:06
Clearance by Danny Wilson.90:00 +2:02
Willo Flood sends in a cross.90:00 +1:24
Corner from the left by-line taken by Niall McGinn.90:00 +0:59
Josh Magennis gets a header at goal. Parried by Jamie MacDonald back into danger.90:00 +0:46
Clearance by Danny Wilson.90:00 +0:35
Corner taken by Gregg Wylde from the right by-line.89:08
Josh Magennis takes the chance to get an effort at goal and missed to the left of the net.87:03
The assist for the goal came from Callum Tapping.87:03 Goal scored
Goal! - Jordan McGhee - Hearts 2 - 1 Aberdeen Free kick scored by Jordan McGhee. Hearts 2-1 Aberdeen.87:03
Callum Tapping restarts play with the free kick.86:02
Free kick awarded for a foul by Ryan Jack on Callum Tapping.85:36
Niall McGinn takes a shot and hits the bar.85:28
Gregg Wylde sends in a cross.83:46
Shot by Jonny Hayes went wide left of the goal.
Dylan McGowan makes a clearance.83:25
Danny Wilson manages to make a clearance.82:21 Substitution
Substitution Josh Magennis on for Peter Pawlett.81:55
The ball is swung over by David Smith.81:05
Shot by Jamie Hamill missed to the left of the target.79:42
Free kick taken by Jamie Hamill.79:04
Unfair challenge on Callum Tapping by Michael Hector results in a free kick.77:55
Clearance by Danny Wilson.77:52
The ball is crossed by Peter Pawlett.75:25
Jamie MacDonald takes the free kick.75:13 Substitution
Substitution David Smith joins the action as a substitute, replacing Jamie Walker.74:42
Peter Pawlett is shown a yellow card for unsporting behaviour.74:42 Booking
Joe Shaughnessy restarts play with the free kick.73:40
Foul by Scott Robinson on Peter Pawlett, free kick awarded.73:13 Substitution
Substitution Gregg Wylde is brought on as a substitute for Clark Robertson.70:32
Centre by Ryan Jack.70:14
Jonny Hayes takes the free kick.69:29
Callum Paterson challenges Willo Flood unfairly and gives away a free kick.69:23
Free kick taken by Jonny Hayes.69:09
Free kick awarded for an unfair challenge on Jonny Hayes by Jamie Hamill.68:14 Substitution
Substitution (Hearts) makes a substitution, with Callum Tapping coming on for Billy King.67:29 Goal scored
Goal! - Niall McGinn - Hearts 1 - 1 Aberdeen Penalty scored by Niall McGinn. Hearts 1-1 Aberdeen.66:45 Dismissal
Kevin McHattie is sent off.66:34
Kevin McHattie gives away a Penalty for an unfair challenge on Calvin Zola.66:12
Danny Wilson manages to make a clearance.65:59
Mark Reynolds restarts play with the free kick.65:44 Booking
Scott Robinson is shown a yellow card for unsporting behaviour.65:38
Free kick awarded for a foul by Scott Robinson on Willo Flood.64:42
Corner taken by Jamie Walker from the left by-line.64:23
Jordan McGhee takes the free kick.64:08 Booking
Clark Robertson receives a caution.63:55
Clark Robertson challenges Billy King unfairly and gives away a free kick.61:48 Substitution
Substitution Brad McKay goes off and Jordan McGhee comes on.57:52
Billy King takes a shot. Nicky Weaver catches the ball.57:02
Danny Wilson takes the chance to get an effort at goal and missed to the right of the target.55:47
Free kick taken by Mark Reynolds.55:41
Billy King gives away a free kick for an unfair challenge on Willo Flood.55:22
Header by Calvin Zola misses left.55:16
Jonny Hayes sends in a cross.54:57
Jamie Walker takes the chance to get an effort at goal. Nicky Weaver parries the effort to safety.53:13
Mark Reynolds makes a clearance.53:10
Kevin McHattie restarts play with the free kick.52:40 Substitution
Substitution Calvin Zola on for Scott Vernon.52:24
Jason Holt fouled by Ryan Jack, the ref awards a free kick.51:43
The ball is delivered by Michael Hector.50:15
Clearance made by Dylan McGowan.50:12
Jonny Hayes sends in a cross.50:05
Nicky Weaver takes the free kick.50:03
Jamie Walker is ruled offside.49:30
Clearance made by Jonny Hayes.49:25
The ball is sent over by Callum Paterson.49:04
Dylan McGowan manages to make a clearance.49:01
Michael Hector produces a cross.48:31
The ball is swung over by Willo Flood.47:18
Ryan Jack makes a clearance.47:13
The ball is delivered by Billy King.45:40
Free kick taken by Willo Flood.45:33
Ryan Jack fouled by Scott Robinson, the ref awards a free kick.45:01
The referee blows the whistle to start the second half.45:00 +1:15 Half time
Half Time The match has reached half-time.45:00 +0:25
Jamie Hamill shoots direct from the free kick and goes right of the target.45:00 +0:18
Jamie Hamill restarts play with the free kick.44:56
Mark Reynolds challenges Callum Paterson unfairly and gives away a free kick.44:15
Mark Reynolds manages to make a clearance.44:07
Jamie MacDonald restarts play with the free kick.43:46
The assistant referee signals for offside against Peter Pawlett.42:44
The ball is delivered by Jason Holt.41:41
Header at goal by Clark Robertson misses left of the target.41:26
The ball is swung over by Niall McGinn.41:20
Corner from the right by-line taken by Jonny Hayes.40:58
Peter Pawlett delivers the ball.38:38
Jonny Hayes delivers the ball.37:04
Jamie Walker takes the chance to get an effort at goal.35:50
Free kick taken by Kevin McHattie.35:23
Free kick awarded for a foul by Clark Robertson on Billy King.34:40
Niall McGinn crosses the ball.34:27
The ball is delivered by Jamie Walker.33:13
Free kick taken by Jamie MacDonald.33:03
Brad McKay fouled by Joe Shaughnessy, the ref awards a free kick.32:54
Corner from the left by-line taken by Jonny Hayes.32:14
Kevin McHattie makes a clearance.32:06
A cross is delivered by Peter Pawlett.31:47
Clearance by Kevin McHattie.31:44
Peter Pawlett sends in a cross.31:06
Header at goal by Mark Reynolds misses left of the target.31:00
A cross is delivered by Niall McGinn.30:56
Corner taken by Jonny Hayes from the right by-line.27:10
Clearance by Brad McKay.27:00
Mark Reynolds crosses the ball in from the free kick.26:29
Kevin McHattie challenges Ryan Jack unfairly and gives away a free kick.26:07
Clearance by Scott Vernon.26:00
Corner from the left by-line taken by Brad McKay.25:34
Free kick taken by Scott Robinson.25:28
Willo Flood gives away a free kick for an unfair challenge on Scott Robinson.23:35
Clearance made by Danny Wilson.23:29
The ball is sent over by Clark Robertson.22:25
Ryan Jack takes the free kick.22:12
Foul by Jamie Walker on Willo Flood, free kick awarded.21:42
Clearance made by Clark Robertson.21:38
Free kick crossed by Kevin McHattie.21:19
Unfair challenge on Billy King by Clark Robertson results in a free kick.20:57
Scott Vernon has an effort at goal and missed to the right of the net.19:56
Jamie Hamill has an effort at goal and missed to the left of the goal.19:33
Brad McKay restarts play with the free kick.18:53
Unfair challenge on Brad McKay by Scott Vernon results in a free kick.17:41
Jamie Hamill provided the assist for the goal.17:41 Goal scored
Goal! - Jamie Walker - Hearts 1 - 0 Aberdeen Jamie Walker scores with their right foot. Hearts 1-0 Aberdeen.16:29
Peter Pawlett has an effort at goal. Jamie MacDonald parries the effort to safety.15:48
Free kick taken by Kevin McHattie.15:36
Free kick awarded for an unfair challenge on Callum Paterson by Joe Shaughnessy.14:07
Clearance by Danny Wilson.14:04
The ball is sent over by Peter Pawlett.12:24
Dylan McGowan makes a clearance.12:19
Jonny Hayes sends in a cross.12:16
Corner taken by Niall McGinn.11:44
Jonny Hayes takes the free kick.11:21
Unfair challenge on Scott Vernon by Kevin McHattie results in a free kick.10:14
Header by Mark Reynolds misses right.10:06
Jonny Hayes restarts play with the free kick.10:04
Jonny Hayes restarts play with the free kick.9:32
Free kick awarded for a foul by Dylan McGowan on Peter Pawlett.8:51
Corner taken by Brad McKay.8:36
Corner taken by Kevin McHattie.6:40
Mark Reynolds restarts play with the free kick.6:34
Foul by Callum Paterson on Clark Robertson, free kick awarded.5:05
Jamie Walker takes a shot and missed to the left of the net.3:46
Corner from the left by-line taken by Kevin McHattie.3:10
Scott Vernon has an effort at goal.2:40
Kevin McHattie restarts play with the free kick.2:35
Unfair challenge on Kevin McHattie by Joe Shaughnessy results in a free kick.1:03
Clearance by Mark Reynolds.0:52
Free kick taken by Kevin McHattie.0:42
Foul by Ryan Jack on Jason Holt, free kick awarded.0:37
Free kick taken by Dylan McGowan.0:22
Billy King fouled by Clark Robertson, the ref awards a free kick.0:00
The ref blows the whistle to start the match.
Live data and text provided by our data suppliers