Goalkeeper Ben Alnwick left manager Keith Hill with a major headache as the Barnsley boss registered a 4-3 win on his return to former club Rochdale.
Barnsley earned their place in the second round of the Capital One Cup in spite of keeper Alnwick, whose moment of sheer madness in time added on handed the hosts a bizarre lifeline.
Their passage through to the next round seemed straightforward with Alnwick holding the ball on 90 minutes and Barnsley leading 2-1. But the Tykes stopper inexplicably headbutted Ray Putterill, conceding a penalty and earning himself a red card.
Jason Kennedy's spot kick took the match into extra time and with fullback Bobby Hassell in goal for the visitors, Rochdale were in the ascendancy.
But another former Spotland favourite - Chris Dagnall - saved Alnwick's blushes as his brace secured victory. Hassell conceded again via another Kennedy penalty after a handball offence by Craig Davies, but went on to make a string of fine saves.
"It was incredible, the most bizarre game I've been involved with in my entire life," said Hill, whose team were cruising to victory after goals from John Stones and Davies cancelled out Andrew Tutte's early effort.
"I don't know where you start with a game like that, but in the end we won 4-3 and I have to applaud the endeavours of the players who were out there at the end because we certainly hadn't prepared for games like that in pre-season!
"It was a great start from Rochdale, they were absolutely superb and played some great football and it wasn't a case of us being caught by surprise, we knew they were capable of that.
" But in the second half as the energy slightly ebbed away from Rochdale, I thought we were in the ascendancy and it was just a routine 2-1 win into time added on. Ben's got the ball in his hands, 90 minutes on the clock and after that it's unexplainable!
"I don't think the ramifications of possibly losing this game would have been any worse than they are now having won the game with Luke Steele being out and Ben Alnwick possibly looking at a three or four game suspension.
"We'd done everything we possibly could in preparation for Ben to start the season as our goalkeeper, but in one game, everything we've done has been thrown out of the window for one petulant lapse of concentration. I will have to bring another goalkeeper in now, no question."
While Hill was left bemused by the match, counterpart John Coleman was utterly outraged by his side's display.
"There are no positives to take from that," he said. "You can't be positive when you've been beaten by 10 men without a goalkeeper. We're not going to crawl down a hole and moan about it, but we'll take no positives from it either. We'll be positive in the next game that we play, but we'll learn from how bad we were at times today.
"We know we can play well and we expect to play well, expect to make chances - but we don't expect to defend as we did today, it was absolutely atrocious.
"We lost the game in a 20-minute spell in the first half when, having passed them off the park, we turned into the Wimbledon of old and decided to smash everything up the park, and that's just not us.
"I don't know why we did it but we did and it allowed them back into the game."