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.
Live text and stats
Saturday, 24 August 2013
McGinn (pen) 68
03 McHattie red card
16 McKay (McGhee 62)
08 Robinson yellow card
14 Walker (Smith 76)
19 B King (Tapping 69)
26 A King,
03 Robertson yellow card (Wylde 74)
16 Pawlett yellow card (Magennis 83)
09 Vernon (Zola 53)
Ref: MuirAtt: 15,218
Attempts on target
Attempts off target
90:00+5:06 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 - 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.
83:40 Dylan McGowan makes a clearance.
83:25 Danny Wilson manages to make a clearance.
82:21 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 David Smith joins the action as a substitute, replacing Jamie Walker.
74:42 Peter Pawlett is shown a yellow card for unsporting behaviour.
73:56 Joe Shaughnessy restarts play with the free kick.
73:40 Foul by Scott Robinson on Peter Pawlett, free kick awarded.
73:13 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 (Hearts) makes a substitution, with Callum Tapping coming on for Billy King.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.