League One Brechin saw off Championship side Cowdenbeath 3-1 after extra time in the first round of the Petrofac Training Cup.
The Blue Brazil had looked on course for the second round when Sean Higgins fired them ahead, yet the visitors fought back before scoring twice in extra time to put their name into the hat.
Higgins opened his Cowdenbeath account 13 minutes into his debut after collecting a fine through ball from Tom O'Brien.
It remained that way for another 50 minutes until substitute Robert Thomson slotted home less than a minute after coming on.
Both sides were profligate in front of goal and neither could find a winner inside 90 minutes.
In extra time Brechin came to the fore, though, with Alan Trouten drilling them ahead in the 93rd minute. And substitute Ryan Ferguson converted Thomson's cross just after half-time to prevent a nervy finish.