Aberdeen's Niall McGinn continued his predatory form this season as he headed home a last-minute equaliser to earn a William Hill Scottish Cup fourth-round replay following a 1-1 draw against Motherwell.
It had for the most part been an even match between the two SPL sides. Motherwell had led through Jamie Murphy's superb strike with 10 minutes remaining.
But Aberdeen bounced back, and McGinn snuck in at the back post to head an Andrew Considine cross past Lee Hollis just as the game was about to tick into injury time.
St Mirren progressed with a comfortable 2-0 victory over Brechin City thanks to goals from Kenny McLean with a well struck free-kick just after the half-hour mark and Jon Robertson four minutes before half-time.
Johnny Russell's hat-trick and a brace from Jon Daly secured a routine 5-0 win for Dundee United at Stranraer, while Kilmarnock beat Queen of the South 2-1 thanks to goals from Cillian Sheridan and Borja Perez, with Nicky Clark on target for the visitors.
Forfar progressed to the next round after a 2-1 win over Ayr, while Dundee were 2-0 winners at Livingstone.
Dunfermline won 1-0 at Partick Thistle, Raith Rovers beat Deveronvale 2-1, Falkirk were 1-0 winners at Stenhousemuir, while Turriff United drew 1-1 against Morton.