Chris Dagnall spared team-mate Ben Alnwick's blushes by firing Barnsley to a 4-3 Capital One Cup first-round win over Rochdale after extra-time at Spotland.
The Tykes led 2-1 heading into injury time, only for Alnwick to be sent off for aiming a headbutt at Ray Putterill.
Alnwick had hold of the ball when he needlessly hit out at the Rochdale man, earning a straight red card from referee Gary Sutton.
His moment of madness presented Jason Kennedy with an opportunity to level the tie from the spot, and he duly beat full-back Bobby Hassell in the Barnsley goal.
Dagnall's classy brace in the first half of extra-time put the visitors back in the driving seat, but a second Kennedy penalty - following a handball by Jim McNulty - brought Dale back into it.
However, the Tykes hung on, Hassell saving brilliantly from Kennedy and Ryan Edwards to hand former Rochdale boss Keith Hill a winning start to his second season as Barnsley manager.
Andrew Tutte had fired Rochdale ahead just six minutes into the game, curling a perfectly-flighted shot over Alnwick and into the net from 20 yards.
Despite bossing the first half, Rochdale were pegged back just before the break when John Stones headed Jacob Mellis' free-kick wide of Josh Lillis in the hosts' goal.
Craig Davies appeared to have decided the tie in the 79th minute when he turned Phil Edwards on the edge of the area and stroked home, yet Alnwick's moment of madness ensured proceedings lasted longer.