Aberdeen exited the Betfred Cup at the quarter-final stage at Tynecastle, losing 3-0 on penalties to Hearts after a 2-2 draw.
The Reds twice led in the capital through Sam Cosgrove’s first half brace of penalties.
But the Jambos hit back through former Don Steven MacLean and Craig Halkett in the second of five minutes of stoppage time at the end of the 90 minutes.
After a goalless extra-time period the tie was settled by spot-kicks.
For the Dons Cosgrove and Niall McGinn lashed over the crossbar with Glenn Whelan and Michael Smith netting for the Jam Tarts.
And when Aberdeen’s third spot-kick from Bruce Anderson was saved by goalie Joel Pereira, Aidan Keena tucked home to send Hearts into a Hampden semi-final with Rangers.
Dons boss McInnes made four changes to the side which beat Livingston 2-0 at the Tony Macaroni Arena on Saturday.
Shay Logan, Connor McLennan, James Wilson and Cosgrove came in to start with Zak Vyner, McGinn, Jon Gallagher and Curtis Main dropping to the bench.
Hearts almost made the perfect start inside the first 40 seconds.
Whelan won a header in midfield which found its way to Uche Ikpeazu, the big striker bundled his way past Mikey Devlin and his shot from the edge of the box had Joe Lewis beaten, but it bounced down off the crossbar, but not over the line and Ikpeazu sent his follow up header wide.
In the second minute goalie Lewis was called into action when Whelan dispossessed Dean Campbell in the centre cicle. The Republic of Ireland international switched play for Ryotaro Meshino on the left.
Meshino cut inside Shay Logan but Lewis was equal to his rising effort from the left side of the penalty area.
Having survived the Jambos’ fast start Aberdeen hit the front with their first meaningful attack in the 11th minute.
Ryan Hedges got the better of Aaron Hickey on the edge of the box and once in the area the Welsh international nut-megged Christophe Berra, who hauled him down in the process with referee Kevin Clancy pointing to the penalty spot.
Cosgrove stepped up and confidently fired his right-footed effort into the bottom right corner from 12 yards for his 12th goal of the season.
In response for Hearts Meshino’s daisy-cutter was deflected just wide for a fruitless corner.
Midway through the first period the Jam Tarts did equalise. Loic Damour’s cross was missed by Devlin as the centre-back tried to head clear.
That mistake left former Don MacLean with time to take a touch and slot past Lewis from close range.
The Dons’ lead was restored on the half hour and again the goal came from the penalty spot.
The move started with Cosgrove holding the ball up and feeding Hedges, who took on the Hearts defence. Wilson made a fine run infield from the right and Hedges slipped a pass onto the former Manchester United man.
Craig Halkett had tracked Wilson’s run all the way, but for some reason Damour felt the need to slide in and hack Wilson down, it was a definite penalty rightly awarded by ref Clancy.
Cosgrove stepped up and again sent keeper Pereira the wrong way from the spot, this time slotting into the bottom left corner – make that 13 goals this term.
Hearts looked shaky at the back after the Reds’ second with Halkett sliding into to stop Cosgrove turning in Hedges’ cross from the right and Berra blocking the effort on the rebound from Hedges.
McLennan also had a shot from an acute angle blocked by Pereira at the near post after getting in behind Jake Mulraney.
There was final chance before half-time when Whelan’s deep free-kick from the right found Halkett at the back post, but Lewis got across his goal to smother the shot.
While the first half started with chances at both ends, play at the beginning of the second period was restricted more to midfield.
The only efforts of note in the first half of the second 45 minutes were Cosgrove’s header well over and Ikpeazu’s volley straight at Lewis from a Whelan corner.
As the game entered the final 20 minutes a third Dons goal would have settled the tie and they were close to getting it in the 73rd minute.
Andy Considine picked out sub Jon Gallagher in space on the left flank. Greig Leigh darted beyond the winger and when Gallagher slipped in the NAC Breda loanee his shot from the left side of the box whistled just beyond the far post.
Hearts, as expected, launched plenty of long balls forward in the closing stages in their search for a leveller that would force extra-time.
And in the second of five minutes of stoppage time they equalised when Mulraney clipped in a cross from the left and centre-back Halkett ghosted in to head home from six yards.
Conceding so late was sickening for the Dons, but it didn’t show in their play at the start of extra-time with Considine having an effort blocked behind and from the resultant corner Lewis Ferguson lashed just over from 15 yards.
In the 109th minute another decent chance fell for the Dons with Leigh hitting the bye-line on the left and his cross found sub McGinn, but he could only direct his header against the right post from six yards out.
In the final minute of the additional period Lewis held a low Sean Clare shot from 25 yards and that was the final chance before spot-kicks.
Hearts: Joel Pereira, Michael Smith, Christophe Berra, Jake Mulraney, Glenn Whelan, Steven MacLean (Sean Clare 69), Uche Ikpeazu, Loic Damour (Aidan Keena 75), Craig Halkett, Aaron Hickey, Ryotaro Meshino (Callumn Morrison 80 (Andrew Irving 114)).
Subs not used: Colin Doyle, Oliver Bozanic, Clevid Dikamona.
Aberdeen: Joe Lewis, Shay Logan, Mikey Devlin (Bruce Anderson 119), Andy Considine, Greg Leigh, Lewis Ferguson, Dean Campbell (Zak Vyner 78), Ryan Hedges, James Wilson (Jon Gallagher 51), Connor McLennan (Niall McGinn 63), Sam Cosgrove.
Subs not used: Tomas Cerny, Curtis Main, Ethan Ross.