Ten-man Aberdeen secured a League Cup quarter-final victory with a spirited performance against Motherwell.
John Sutton had a goal disallowed for the hosts before the Dons had Joe Shaughnessy sent off.
Motherwell's Shaun Hutchinson struck the crossbar from a corner before Andrew Considine headed the Dons ahead.
And Jonny Hayes cemented Aberdeen's semi-final place alongside Hearts, Inverness and St Johnstone by firing home on the break in injury-time.
The feat was all the more remarkable given Derek McInnes's side played more than 78 minutes a man down.
In truth, the Dons looked slightly fragile right from kick-off and were relieved to see an early Sutton strike chalked off for offside.
The hosts raged when referee John Beaton disallowed it a good 10 seconds after Sutton curled the ball into the top corner, but it had only come to the big Englishman because an Aberdeen clearance had rebounded off Motherwell's Stuart Carswell.
Soon afterwards, Beaton showed Aberdeen right-back Shaughnessy a straight red card for a lunge on Zaine Francis-Angol near the halfway line.
Calvin Zola was sacrificed as McInnes brought on Considine to shore up the defence.
Considine came on in the first half and made the breakthrough late on
Every touch of Francis-Angol from that point on was booed by the Dons fans, who clearly thought he had made too much of the challenge - and their anger increased when Hutchinson took out Peter Pawlett only to receive a booking.
It seemed a Motherwell opening goal was imminent but neat football, which allowed half-chances for Estonian Henri Anier and Simon Ramsden, failed to produce a breakthrough.
At the other end, Motherwell goalkeeper Gunnar Nielsen dropped a cross which almost fell nicely for Niall McGinn.
McGinn then robbed Hutchinson and bore down on goal before a desperate block by Stephen McManus thwarted the Northern Irishman.
A serious-looking injury to Dons left-back Clark Robertson meant McInnes had to introduce his second substitute before half-time - Scott Vernon entering the fray.
Motherwell appealed unsuccessfully for a penalty after the break when Mark Reynolds felled Anier on the edge of the box.
Aberdeen goalkeeper Jamie Langfield saved from Stuart Carswell as the hosts searched for the opening goal - and the visitors breathed a sigh of relief when Hutchinson's header came back off the bar.
The breakthrough finally came when Considine popped up at the back post to convert Hayes's corner after Pawlett's shot had been beaten wide by Nielsen.
Under the cosh in injury time, one became two as Aberdeen countered and Hayes smashed in high at the near post after being fed nicely by Vernon.
- 12 Nielsen
- 04 Ramsden
- 03 Hammell
- 14 Lasley
- 05 Hutchinson Booked
- 06 McManus
- 18 Carswell Booked
- 08 Lawson (Ainsworth - 45' )
- 24 Anier (McHugh - 68' )
- 09 Sutton
- 17 Francis-Angol
- 07 McFadden
- 16 McHugh
- 20 Kerr
- 21 Stewart
- 25 Ainsworth
- 01 Langfield
- 02 Shaughnessy Dismissed
- 03 Robertson (Vernon - 47' )
- 08 Flood
- 04 Anderson Booked
- 06 Reynolds
- 11 Hayes
- 22 Jack
- 10 McGinn
- 07 Zola (Considine - 21' )
- 16 Pawlett (Robson - 85' )
- 05 Considine
- 09 Vernon
- 15 Robson
- 17 Wylde
- 20 Weaver
Ref: John Beaton