Forfar triumphed 4-3 on penalties to settle a thrilling clash against Brechin and set up a William Hill Scottish Cup fifth-round tie at home to St Johnstone.
The visitors took the lead three times only to be pegged back on each occasion as the fourth-round replay finished 3-3 after extra-time.
Andy Jackson fired Brechin ahead after just seven minutes but the lead did not last long as Martyn Fotheringham found Chris Templeman and he headed the hosts level.
The away side regained the lead for a second time as Alan Trouten converted from the penalty spot but Gavin Malin, having earlier hit the crossbar, pulled level in the 85th minute.
Brechin, yet again, struck first in extra time through Allan Walker, only for Templeman to head home his second of the game and force a penalty shoot-out, where Forfar triumphed to settle an enthralling clash.