Aberdeen 1 - 0 Hearts
Aberdeen secured a 1-0 victory over third-placed Hearts, lifting the Dons within a point of Ladbrokes Premiership leaders Celtic.
Rooney kept his cool to convert from the spot three minutes from time after Jordan McGhee had bizarrely handled a cross that seemed to be going out of play.
The hosts dominated proceedings in the first half, but suffered an early scare when Sam Nicholson met a Callum Paterson cross at the back post only to send his effort off target.
It was not long before Aberdeen took control of matters and, in the absence of groin-strain victim Niall McGinn, everything seemed to go through the twinkle-toes of Jonny Hayes.
The Irish winger was demanding the ball on the left and the right, and it was from his cross, flicked on by Kenny McLean, that Ash Taylor had the chance to put Neil Alexander under pressure, but the ball looped off the defender's foot and into the goalkeeper's arms.
Within seconds, another Hayes cross found Rooney at the near post, and Alexander had to be more alert, diving to turn his shot around the post.
Hayes' confidence was such that he attempted a shot from an absurd angle, almost on the goal line. Alexander had to react well to hold the wickedly swerving attempt.
The visitors were struggling to find a way to stop Aberdeen and conceded 11 fouls in the first 45 minutes.
Perhaps the clearest opening for Aberdeen came when McLean was hauled down by substitute Morgaro Gomis. Hayes found Andrew Considine from the resulting free-kick, but the defender disappointingly powered his header straight at Alexander.
There was one final involvement for the Hearts goalkeeper before the interval, as he dived full-stretch to hold McLean's 20 yard effort following a neat turn outside the area.
Aberdeen were dealt a blow at the interval as Mark Reynolds was forced off through injury, to be replaced by club captain Ryan Jack, prompting a tactical reshuffle which saw Shinnie drop to left-back.
The hosts seemed undeterred by the loss of the influential defender, but were almost caught out when Nicholson's shot from distance crashed back off the crossbar, with Dan Ward beaten all ends up.
The Dons continued to press, and Rooney will be wondering how he did not find the target from a McLean cross after 57 minutes.
That said, Hearts had a gilt-edged opportunity to break the deadlock after 64 minutes. Peter Pawlett was caught in possession and the visitors seized on his mistake, with Gomis playing in Osman Sow, who should have scored but was denied by a smart save from Ward.
The danger had not passed, though, and only a combination of Ward and Willo Flood on the goal-line kept the scores level from Nicholson's corner.
Still it was the home side with the lion's share of the possession, though. Substitute David Goodwillie did well to get a shot away on 77 minutes after twisting and turning in the area, but his attempt deserved better than the corner he was rewarded with.
Their efforts were not to be in vain, however, and when McGhee inexplicably reached high in the air to fist away a cross, the Dons were rewarded. Rooney stepped up, and with a low strike to Alexander's left, calmly sent the penalty into the back of the net.