Two goals from Paul Hartley gave Aberdeen a dramatic late win over First Division Falkirk at Pittodrie Stadium to put them into the semi-finals of the Co-operative Insurance Cup.
The visitors broke the deadlock when the French defender Mehdi Khalis nodded home Kallum Higginbotham's back-post corner after 33 minutes, although Aberdeen felt they should have been awarded a free-kick for a foul on Rory McArdle in the build-up to the set-piece.
However Hartley equalised after 64 minutes to ensure the match went the distance when he headed Darren Mackie's inviting cross past Robert Olejnik in the Falkirk goal.
And when Chris Maguire was brought down in the area by Khalis in the third minute of injury time, Hartley stepped up to send Olejnik the wrong way.
Aberdeen will be joined in the final four by Motherwell who beat Dundee United 1-0 thanks to Alan Gow's first goal for the club.
Gow turned and volleyed home from close range for his first goal for Motherwell after United failed to deal with Tom Hateley's 86th-minute corner.
An extra half-hour had seemed inevitable after a scrappy second half but Gow produced a rare piece of quality to continue Craig Brown's impressive reign as manager at Fir Park.