Aberdeen have taken the last remaining Scottish Cup quarter-final place after beating Kilmarnock 4-3 after extra time at Rugby Park.
Killie had taken the lead through Mohamed El Makrini who scored with an overhead kick just before half time.
Aberdeen boss Derek McInnes took action at the break with three changes and had to wait for his reward but just as Killie were seeing the game out Andy Considine heading in an equaliser with two minutes to go.
Extra time brought a flurry of goals. Matty Kennedy scored his first Aberdeen goal to put his side in front before Eamonn Brophy levelled and Nicke Kabamba then gave the home side the advantage.
Sam Cosgrove made it 3-3 from the penalty spot and moments later Connor Johnson headed into his own net to put the Dons through.
St Mirren had booked their place in the next round after a dramatic replay against Motherwell at Fir Park on Tuesday night.
After racing to a 4-1 half-time lead, St Mirren were pegged back by Motherwell after the break with the Steelmen bringing the score back to 4-4 to force extra time. Neither side found the net after the extra 30 minutes and the Paisley side came out on top in the penalty shootout.
Hibernian v Inverness Caledonian Thistle
St Mirren v Aberdeen
St Johnstone v Celtic
Hearts v Rangers
Ties to be played on the weekend of Saturday, February 29