Aberdeen continued their resurgence as late goals from Andrew Considine and Jonny Hayes sent them into the League Cup semi-finals despite playing with 10 men for the bulk of the 90 minutes against Motherwell at Fir Park.
Considine was only on the pitch because right-back Joe Shaughnessy had been sent off for a reckless challenge on Zaine Francis-Angol but he headed home from Jonny Hayes’ 83rd-minute corner.
Motherwell had an early John Sutton goal disallowed but they initially struggled to make any inroads against the 10 men, although they improved after the break.
Stuart Carswell missed a good chance and Shaun Hutchinson headed off the frame of the goal but Aberdeen otherwise defended superbly against a succession of cross balls.
The Dons also lost Clark Robertson to injury to leave Peter Pawlett and Hayes as makeshift wing-backs but they showed immense resolve and the Irishman ran clear after a Well corner in injury-time to seal a 2-0 win.
Motherwell had the ball in the net inside five minutes only for a belated offside flag to spoil their celebrations. Sutton turned the ball home from six yards after a clearance had cannoned off Paul Lawson but linesman Graham Chambers eventually put up his flag after a delay of several seconds.
Then Shaughnessy slid in heavily on Francis-Angol, prompting an angry reaction from the home side and referee John Beaton quickly ran over before flashing the red card.
Aberdeen had an escape three minutes after the break when Mark Reynolds appeared to bring down Anier as the Estonian ran out of the box but Beaton ignored the penalty appeals.
Hutchinson headed off the junction of post and bar as the Dons held on.