Cupar Hearts made the journey to Tullibody to face the Stirling and District side with a place in the last 16 of the Scottish Cup at stake.
A massive crowd travelled to cheer on Hearts who were the better team on the day but struggled to take their chances and in a cruel twist of fate an own goal would see them crash out of the competition.
With five minutes on the clock Jakub Dobes’ superb shot looked destined for the top corner only for it to come back off the woodwork and cleared out of play.
Scott McKay’s long throw found Andy Wainwright and his shot was matched by ‘keeper Stuart Christie.
Cupar were playing some neat football and enjoying the majority of possession.
But against the run of play the home side dealt Hearts a blow when they opened the scoring one minute before half time.
Craig Martin gathered a cross and cut back for Stuart Love, waiting in front of goal, who blasted the ball into the net.
Hearts introduced Steven Pennington and Lee Sibanda early in the second half determined to get themselves back on level terms.
Cupar equalised on 72 minutes when Jakub Dobes latched onto a long ball forward by Sean Murdoch and lobbed the ball over the ‘keeper and into the net.
The winner came with nine minutes remaining when Brian McAdam’s effort came back off the post and was sent back in with Cupar’s Aaron Leadbetter unlucky to turn the ball into his own net.
It was disappointment for Hearts who lost out but they should be proud of the massive achievement of being one of only two Fife teams to reach the last 32.
Tomorrow (Saturday) Cupar Hearts host Leven United.
Cupar Hearts - Cichowski, K. Brown, Blyth, Murdoch, Leadbetter, Dow, McKay, Wainwright, Gray, Sutherland and Dobes.
Subs - Anderson, Sibanda, G. Brown, McLuckie, Watson, Pennington, Rann.