Inverurie Loco Works scored with less than 30 seconds of normal time remaining to earn a 4-4 draw with Annan in an incredible William Hill Scottish Cup clash.
The Highland League outfit looked on course for an impressive win when they led 3-1 with a third of the game to play, but they ended up needing a last-gasp strike from Neil McLean to earn a replay.
Peter Weatherson smashed Annan into a third-minute lead, but McLean levelled with an emphatic finish before the break before Andy Hunter's turn and shot and Martin Laing's sweet effort put Inverurie in charge.
Annan hit back, though, with three goals of their own as Steven Swinglehurst's header, Stuart McColm's close-range finish and Weatherson's second of the match gave them a 4-3 lead.
But McLean struck in the 90th minute after a goalmouth scramble to send it to a replay.
Scottish Cup News
With the Scottish treble secured, what's next for Tottenham target Ange Postecoglou?
Saturday's treble-sealing Scottish Cup win cemented Ange Postecoglou's place in Celtic history. Now, with Spurs waiting in the wings, the 57-year-old faces a tough decision.
Celtic complete treble with Scottish Cup final win over Inverness Caledonian Thistle
Celtic clinched the domestic treble after beating Inverness Caledonian Thistle 3-1 in the Scottish Cup final at Hampden Park on Saturday.
Celtic beat Rangers in Scottish Cup to keep domestic treble hopes alive
Celtic kept their hopes of winning a domestic treble alive after beating rivals Rangers 1-0 in the Scottish Cup semifinal with a goal from Jota.
Jota nods Celtic in front in Old Firm semi final
Jota puts Celtic 1-0 up against city rivals Rangers in the Scottish Cup semi final.
Defender scores shocking own goal vs. Rangers
Raith Rovers' Ryan Nolan puts the ball in the back of his own net despite being under no pressure in their Scottish Cup tie against Rangers.
Shunsuke Nakamura's five career-defining chapters as Asian legend announces retirement
With Shunsuke Nakamura announcing his impending retirement, we look back at the glittering career of the Asian football icon.