Last updated on .From the section Football

Hearts' Jordan McGhee handled to give Aberdeen a penalty

Adam Rooney's 12th goal of the season three minutes from the end moved Aberdeen to within a point of Celtic and seven points clear of Hearts.

But Derek McInnes' side can thank a moment of madness by full-back Jordan McGhee for gifting them the chance to win the game from the penalty spot.

Only the young defender knows why he jumped up and handled the ball in the six-yard box when under no pressure.

Victory extends Aberdeen's unbeaten run to five games.

Third-top Hearts had also gone into the game looking to protect a sequence of four league games without a loss, only a League Cup defeat by Celtic interrupting the Edinburgh side's run of eight games without defeat in the league as they headed north.

But they were blown away by Aberdeen when the teams last met at Tynecastle in September and a repeat looked on the cards in a first half dominated by the home side.

Adam Rooney (centre) won the game for Aberdeen from the penalty spot

Niall McGinn did not play for second-placed Dons through injury, but the Northern Ireland forward was not missed as Jonny Hayes accepted the responsibility of tormenting the opposition down the left side.

The former Inverness Caledonian Thistle midfielder gave poor Callum Paterson in particular a terrible time with his mazy runs down the wing, while his set-piece deliveries were always a threat.

Hearts actually created the first chance of the afternoon when Sam Nicholson headed a Paterson cross narrowly wide at the back post, but that was the home defence's only moment of anxiety in the opening period.

From then until the interval the Jambos were hanging on as they were pinned back for long spells, but desperate defending at least got them to the break on level terms.

Neil Alexander played his part in that with crucial saves from Hayes' acute angle-driven cross and a full-length block high to his left to keep out a Kenny McLean 25-yard effort.

The Hearts goalkeeper was also well positioned to hold on to an Andy Considine header, but the Dons defender should have made more of the chance created by another tricky Hayes free kick.

Hearts were forced into trying to break play up to repel Aberdeen's attacks, but Miguel Pallardo took things too far and was substituted by his manager before he got himself sent off.

The Spaniard was booked for a foul on Peter Pawlett in 27 minutes and, seconds later, tripped Hayes with Robbie Neilson quick to replace him with Morgaro Gomis.

The pattern of play was barely altered in early in the second half, but Nicholson did get forward to crack a 25-yard drive off the crossbar then pick up a booking for pulling back Pawlett as he threatened to break clear.

Aberdeen kept pressing only for Rooney to head a Kenny McLean cross over the bar from just six yards before the visitors at last started to enjoy a phase of attacking play of their own.

Ward made a marvellous blocking save to deny Juanma and, from the corner, Willo Flood cleared Paterson's header off the line.

However, Aberdeen got the win they deserved when Rooney made his usual efficient job from the penalty spot to confirm that the Pittodrie side have rediscovered their early season form.