Aberdeen left it late as they came from behind to beat Dundee in extra-time of the Betfred Cup at Dens Park.
Trailing 1-0, Dons defender Andy Considine scored an injury-time equaliser for his side before Sam Cosgrove’s header won the game for Aberdeen in extra-time.
The Dons will travel to Hearts in the quarter-final.
Dons boss Derek McInnes made one change from the side which lost to Rijeka at Pittodrie in the Europa League on Thursday and it was an enforced one with Lewis Ferguson missing out due to suspension.
Craig Bryson came in for his first start of the season after recovering from a groin strain.
Aberdeen had an early chance through Niall McGinn but his effort was blocked by Jordan McGhee.
The early opportunity was the only one the Dons created in a poor first half, however, as the Dark Blues went on to dominate before deservedly scoring the opening goal just before the break.
Josh Todd and Danny Johnson both went close for the home side as Aberdeen struggled to build any sort of rhythm at Dens Park and the home side’s persistence was rewarded in the 44th minute when they were awarded a penalty after Andy Considine hauled Jordon Forster to the ground as they went to challenge a long free kick into the box.
Johnson made no mistake, sending Joe Lewis the wrong way to give his side a lead their first half play merited.
The Dons showed much more urgency at the start of the second half as they chased an equaliser with Jon Gallagher creating chances for Sam Cosgrove, who fired wide, and Ryan Hedges, whose shot was saved, before the Irishman had an effort himself which he fired straight at Jack Hamilton.
The tension increased in the closing stages as Aberdeen made one last push for an equaliser and the home side had Forster to thank for keeping their lead intact as he cleared Gallagher’s header off the line.
Dundee looked to have done enough but there was to be a sting in the tail as the Dons got an equaliser in injury time.
Ojo’s cross was met by Greg Leigh who saw his header saved by Hamilton. The ball broke to Gallagher who fired a low cross into the box where Considine was on hand to scramble the ball over the line.
It was a cruel blow for the home side and the Dons took full advantage of their lifeline in extra-time as Leigh crossed for Sam Cosgrove to beat Hamilton with a well-placed header.