David Robertson's last-gasp goal gave Dundee United a 3-2 win over St Mirren in their Scottish Tennents Cup third round clash.
St Mirren fought back from two goals down, but Robertson ended their dreams with a late winner.
Barry Robson fired United in front on 31 minutes and Garry Kenneth doubled the lead a minute after the break.
Richard Brittain pulled a goal back for St Mirren from the penalty spot on 76 minutes and John Sutton drew the visitors level five minutes later.
The game looked to be heading for a replay until Robertson popped up with the winner in the dying seconds.
Cowdenbeath beat Division One rivals Brechin 1-0 in their third round replay at Glebe Park.
Douglas Hill scored the all-important goal for Cowdenbeath on 38 minutes to send them into the fourth round. Queen of the South beat Dundee on penalties to reach the fourth round after the game ended 3-3.
Stephen Dobbie broke the deadlock five minutes before the break, but Derek Lyle equalised for Dundee three minutes after the break.
Dobbie restored the home side's lead on 69 minutes only for Bryan Deasley to draw Dundee level again on 82 minutes.
Sean O'Connor fired Queen of the South in front again for the third time on 86 minutes, but their lead proved short-lived with Lyle netting his second of the contest a minute later to send the game into extra-time.
Neither side could find a goal in extra-time to send the game to a dreaded penalty shoot-out.
Queen of the South kept their cool from the spot to progress 4-2 on penalties
Click on fixture for full match summary
Scottish FA Cup Third Round
Dundee Utd 3-2 St Mirren
Scottish FA Cup Third Round Replay
Brechin City 0-1 Cowdenbeath
Queen of the South 3-3 (AET) Dundee (Queen of the South win 4-2 on penalties)