A courageous second-half performance could not prevent Hearts losing this dramatic opening Premiership match as John Souttar suffered an injury at Pittodrie.
The Edinburgh club went from 1-0 down to 2-1 up and finished on the wrong end of a 3-2 scoreline as Aberdeen claimed the three points from a pulsating encounter.
Teenage Hearts full-back Aaron Hickey was sent off for a second booking with his team 2-1 ahead, and the hosts made their extra-man advantage count. They were 1-0 ahead through the in-form Sam Cosgrove with Hearts lacking a threat up front. Steven Naismith changed that instantly after entering the field as a second-half substitute.
He headed the equaliser two minutes after replacing Andy Irving, and Jamie Walker then put the visitors 2-1 up before Hickey's dismissal. That left revitalised Hearts facing an uphill task to hold on to their lead. A Cosgrove penalty and a winner from substitute Ryan Hedges with five minutes left secured victory for Derek McInnes' side.
Hearts lost Souttar during the first half and will assess the extent of his injury over the next 24 hours. He appeared to take a knock during a tussle with opponents on the far side of the field and trudged off disconsolately moments later.
A total of 1,471 supporters made the journey from Edinburgh to the north east, excited by Naismith signing a four-year contract on Thursday. He did not make the starting line-up as he is not 100 per cent fit after injury, likewise fellow striker Conor Washington. All three centre-backs were accommodated in a reshaped back line, with Walker and Jake Mulraney supporting Uche Ikpeazu up front.
Aberdeen's 5-0 Europa League qualifying thumping of the Georgian club Chikhura Sachkhere on Thursday night took them into their first Premiership fixture high on momentum. Cosgrove, fresh from a hat-trick in that tie, was their primary threat and made the afternoon's first penalty claim on seven minutes.
A nudge from Michael Smith saw the giant forward fall on the ground to loud appeals from the home support. Referee Don Robertson was unmoved. Seconds later, Jon Gallagher's cutback was sent soaring over the Hearts crossbar from 12 yards by the unmarked James Wilson.
Cosgrove displayed his clinical edge with the opening goal on 13 minutes. Hearts appealed for a free-kick when Scott McKenna appeared to foul Ikpeazu and the hosts broke swiftly from their own territory. Andrew Considine's loping forward delivery scuffed off the top of Christophe Berra's head. Cosgrove ran on to the bouncing ball in behind the visiting defence on the left. He steadied himself for a composed finish across goalkeeper Zdenek Zlamal and into the corner of the net.
Aberdeen claimed again for a penalty when John Souttar tackled Scott Wright inside the penalty area. Then Hearts forced an excellent save from Joe Lewis as Berra's powerful header from Irving's corner was pushed over by the goalkeeper.
An increasingly-physical contest saw players from both teams cautioned for late challenges before Souttar limped off injured to be replaced by Clevid Dikamona. The final chance of the first half fell to the Tynecastle defender Craig Halkett, but his head flick from Andy Irving's free-kick landed wide of target.
Hearts required a change to inject some attacking panache and it arrived on 66 minutes. Naismith and Washington both entered the fray, with chants of “one Steven Naismith” from the away section. It took him two minutes to make an impact.
Smith's long throw was flicked on by Halkett and Naismith arrived at full tilt to power a header beyond Lewis at the near post. It was as if he'd never been away as he sprinted off to celebrate.
Hearts now looked an entirely different proposition having switched to a 4-4-2 formation with Naismith wide on the left. They scored again 14 minutes from the end. Ikpeazu slid a delicate through pass to Walker, who was free of his marker and prodded a low finish past the advancing Lewis an in off the post.
This encounter was now wide open but Aberdeen were far from finished. After Hickey's dismissal for fouling McGinn, the Northern Irishman won a penalty for a foul by Dikamona. Cosgrove wasn't going to waste the opportunity and rammed the penalty home to level the scoreline.
Five minutes from the end, the numerical advantage told as Aberdeen claimed the winning goal. Greg Leigh's left-sided cross landed with Hedges and his first-time finish flew high into the Hearts net.
Aberdeen (4-3-3): Lewis; Logan, McKenna, Considine, Leigh; Gallagher (Anderson 82), Ferguson, Ojo; Wilson (McGinn 68), Cosgrove, Wright (Hedges 61). Unused subs: Cerny, Ramsay, Campbell, May.
Hearts (3-4-2-1): Zlamal; Souttar (Dikamona 39), Halkett, Berra; M Smith, Clare, Irving (Naismith 66), Hickey; Walker, Mulraney (Washington 66); Ikpeazu. Unused subs: Doyle, White, Bozanic, Cochrane.
Referee: Don Robertson.