Brechin earned a Scottish Cup replay with Cowdenbeath after a dramatic last-minute goal from Kevin Byers.
Byers sent a first-time shot from 25 yards low into the net to make up for Iain Russell's earlier penalty miss.
But the drama was not over with Brechin goalkeeper Craig Nelson grabbing a David Hannah shot on the goal-line in the final seconds of an exciting tie.
Cowdenbeath had gone in front with a Patrick Clarke shot after 22 minutes, while both sides hit the woodwork.
Cowdenbeath: Hay, Baxter, Ritchie, Hill, Ellis, Patrick Scullion (Fusco 84), Fotheringham (Weir 75), Hannah, Paatelainen, Buchanan, Clarke (Dalziel 90). Subs Not Used: McBride, Allison.
Booked: Clarke, Weir. Goal: Clarke 22.
Brechin City: Nelson, Richard Walker (Geddes 80), Archibald, White, Stuart Ferguson (Connolly 73), Callaghan, King (Steven Ferguson 66), Byers, Smith, Hampshire, Russell. Subs Not Used: Flynn, Hillcoat.
Booked: White. Goal: Byers 90.
Att: 675
Ref: B Winter