Nick Colgan went from villain to hero as his penalty save ended Barnsley's four-year exile from the second tier of English football.
The Tykes goalkeeper was on the brink of being remembered for one of the worst play-off final blunders but redeemed himself in the shootout against Swansea.
A pulsating Coca-Cola League One play-off final ended 2-2 and it was Barnsley who held their nerve in the shootout, converting all four of their spot-kicks.
Substitute Adebayo Akinfenwa blazed over for the Swans before Colgan saved from Alan Tate to earn his side promotion to the Championship.
Daniel Nardiello's second-half free-kick ultimately sent the game into extra-time, after Colgan had spilled Andy Robinson's harmless-looking shot into his own net to give Swansea a 2-1 lead.
Hayes opened the scoring for Barnsley before former Tykes trainee Rory Fallon levelled with a sensational bicycle kick.