Scarborough Athletic were knocked out of the Integro League Cup on Tuesday night, losing 2-1 on the road at Farsley Celtic.
Having led 1-0, Farsley scored each side of the interval to wrap up the victory on a freezing night in West Yorkshire.
Boro started their quest for the quarter-finals without top-scorer James Walshaw, who was rested, though new boy Jayden Antwi took his place on the bench.
In fact, Antwi found himself on the pitch after just 17 minutes when he replaced defender Bailey Gooda, who limped out of the action.
By that point both sides had created useful openings, Michael Coulson finding the roof of the Farsley net, while at the other end, Jimmy Spencer and Adam Clayton both went close.
Tommy Taylor then made two smart saves in quick succession, firstly denying Nathan Cartman and then holding onto a Clayton header.
But it was Boro who took the lead on the half-hour when James Cadman was felled in the box and Coulson stepped up to roll home from the penalty spot.
Steve Kittrick's men tried manfully to hang onto the lead until the half-time interval, but after a scramble in the box just seconds before the break, Luke Parkin popped up to finish.
There was a quiet start to the second period, with a rash drive from Cartman being the only highlight.
Then, on the hour, Spencer lit the touchpaper for the hosts, bending beautifully home to turn the game on its head.
Boro rolled the dice in the final moments, throwing on the tricky pairing of Wayne Brooksby and Luke Lofts.
It was Cartman who had the next big chance though when the ball was knocked down to him on the edge of the six-yard box, but he scuffed his effort wide.
As the minutes crept into added time, Nathan Valentine looped a header onto the roof of the net as Boro looked to grab a last-gasp leveller.
But it was Farsley who marched on, easing through the final moments to take the win.