Following Thursday's 5-0 demolition of Chikhura in the Europa League qualifier, manager Derek McInnes made two changes ahead of this Scottish Premiership opener. Niall McGinn and Ryan Hedges were benched, perhaps with an eye on Thursday's upcoming trip to Rijeka, James Wilson and Scott Wright returning to the starting line-up. Right-back Calvin Ramsay, just 16, made his first appearance on the first team bench after impressing for the developing Dons in pre-season.
Hearts, like the Dons, unbeaten in four games this season, albeit in the Betfred Cup, made one change from the 1-1 draw at East Fife last Saturday, Dario Zanatta missing out, Jon Souttar replacing him. Steven Naismith was among their substitutes, three days after signing a four year deal at Tynecastle.
After a scrappy opening, the Dons' fashioned the first half chance after six minutes, Shay Logan setting Jon Gallagher on the chase down the right. His ball into the box found Sam Cosgrove but he was always stretching and couldn't get any direction on his header.
Within a minute, there were muted penalty claims as Smith ran into the back of Cosgrove, but a corner was awarded instead. Gallagher and Scott Wright worked a lovely short corner routine, Gallagher then drilling in a low cross which James Wilson drove over the bar from around the penalty spot. Perhaps he should have done better.
The goal machine that is Sam Cosgrove made no mistake in the 13th minute, slotting the Dons in front. Andy Considine cleared the ball forward, Berra misjudging its flight and only getting a glancing header on it, back towards his own goal. Cosgrove pounced on it and, cutting in from the left, expertly shaped his angled finish across goal and just inside the far post.
Prolonged Aberdeen pressure might have made it two just three minutes later, Gallagher having a shot blocked by Berra's upper arm then forcing a fine diving save from Zlamal, both ferocious shots from outside the box. The Dons were regularly looking to exploit his pace out wide on the right, using the space left by the Hearts back three.
A poor refereeing decision allowed Hearts to break in the 19th minute when Lewis Ferguson looked to be brought down on halfway, Logan tidying the move up. From the resulting corner, Irving picked out Berra who caught his header to perfection, Joe Lewis producing a fabulous diving save high to his left to push the ball over the bar.
Young Aaron Hickey hauled down Scott Wright with the ball nowhere to be seen to collect the game's first yellow card in the 27th minute, though the youthful wing-back looks better suited to getting detention as punishment.
Ikpeazu followed him into the book six minutes later - and was a little lucky to get just that - for running straight into Scott McKenna, the big centre-back poleaxed for a moment, signalling that he was less than impressed by waving away Ikpeazu's proffered handshake.
As the game started to boil over, a late challenge on Considine was missed before a lunge from Clare on Wright did earn card number three in the 35th minute.
Dikamona replaced Souttar in the 39th minute and immediately left Funso Ojo in a heap, Logan's free-kick in from the halfway line drifting out of play. Just before the break, Logan found his name in the book too, the fourth in a feisty first half. In the flurry of free-kicks that followed, Irving's dangerous ball through the box just eluded Halkett and drifted wide of goal, a let off for the Dons right at the death.
The first action of the second half saw Lewis Ferguson go in the book, catching Irving with his arm as both challenged for the ball in the 47th minute. Persistence from Gallagher down the right won a corner in the 51st minute, Wilson's delivery arcing through the box but not drawing a finishing touch from anyone.
Two minutes later, Logan was cleaned out by Mulraney who dumped him on the running track, yellow card number four coming for the visitors, Ojo swiftly testing the referee's patience again with a challenge on Walker - the seventh yellow card of the afternoon. That was symptomatic of the game, Hearts in particular looking to make the game as scrappy as possible, knocking the Dons out of their rhythm.
On the hour, Scott Wright - who had taken a knock when trying to close down Zlamal a few minutes earlier - was replaced by Ryan Hedges in the first Aberdeen change of the afternoon. Hearts responded four minutes later with the introduction of Naismith and Washington in place of Irving and Mulraney in an attempt finally take the game to the Dons. With little else happening, another substitution came in the 68th minute, Wilson making way for Niall McGinn.
As the two sides were restructuring, from nowhere Hearts were level. A long throw into the box from Smith saw Ojo win his header only for it to cannon into the back of Halkett's head, propelling the ball into the near post where Naismith was poaching to nod past Lewis. Suddenly Hearts were a yard quicker, Naismith in particular looking a threat whenever the ball came anywhere near him.
Fellow sub Washington wasn't far away in the 73rd minute either, darting away from the defence to get on the end of Clare's header forward only to put his drive into the side netting.
The goal that had been threatening came in the 76th minute, Naismith picking out Ikpeazu in acres of space. His ball into Walker's path got him away from the defence and he clipped a shot across Lewis and in off the far post as the visitors were suddenly well on top as their extra few days of rest started to tell.
It would have been easy for Dons' heads to drop but this is a group of players made of sterner stuff than that and set about turning the tide.
Crucially, Hearts were down to ten men in the 78th minute, Hickey diving in on McGinn on the edge of the box and collecting the inevitable yellow card, his second of the afternoon. The free-kick was drilled in low by Hedges and as McGinn tried to control it, Dikamona came hurtling through the back of him giving the referee the easiest decision of the afternoon - penalty. Goal number eight of the season incoming, Cosgrove thrashing the ball into the roof of the net for 2-2.
As the rest of the side celebrated, Gallagher was replaced by Bruce Anderson as Derek McInnes made his final change of the game.
The sending off and the goal had entirely changed the temperature of Pittodrie and once again, it was the Dons ascendant now, looking for that crucial late winner.
Hearts were lucky not to be down to nine men after yet another clumsy challenge from Ikpeazu, this time on Ferguson. From the free-kick, the Dons advanced down the left with Leigh. His cross drew a brilliant backheel from McGinn that dummied the Hearts defence and half the crowd too. Ryan Hedges wasn't fooled though and he swooped down upon the ball and smashed it past Zlamal for his first Aberdeen goal. He collected a booking for his understandably exuberant celebration.
From there, the Dons controlled the game and saw it through comfortably enough. Not always pretty, but Aberdeen's determination to claw the game back after shipping those two quick goals, allied to some impressive attacking play at times, bodes very well for the season ahead.