Buckingham Athletic missed two penalties but fought back from three goals down to record a thrilling 4-3 victory over high-flying Bedford.
After a recent poor run of form, Athletic made the worst possible start as a good home crowd witnessed the visitors race into a 3-0 lead after 17 minutes.
The game appeared to be over, but Athletic showed impressive resistance and, after Phil Martin missed from the spot, they scored two goals in three minutes before half time, first through Simon Hodges and then Ryan Wiffin.
Those goals filled the hosts with confidence as they continued to press after half time and Martin made amends for his earlier miss to bring Athletic level.
When Buckingham were awarded a second penalty, it looked like the comeback was complete but this time it was Adam Bone who watched his penalty saved.
It mattered little, though, as Scott Latham rose to head home the winner eight minutes from time to complete a dramatic turnaround.
Athletic are up to 15th in SSML Division One and will be hoping to record back-to-back wins when they host mid-table Baldock Town on Saturday.