Barnsley fought back from two goals down to draw level right at the death, but there was to be penalty heartache for the Reds as they lost to Oldham in the second round of the Johnstone Paints Trophy at Boundary Park.
The Latics opened the scoring through Dominic Poleon, a player signed by Barnsley boss Danny Wilson when he was Sheffield United manager, after 22 minutes.
The lead was doubled just before half time when another former Blade Danny Philliiskirk struck the second.
Just minutes before that, Barnsley had their best chance of the night when Devante Cole struck the post from a Sam Winnall pass.
Straight after the break though the Reds came out fighting and on 53 minutes Luke Berry struck home from 18 yards.
After pressing for the remainder of the half, a stunning strike from Winnall from all of 35 yards comepleted the comeback.
From there it was straight onto penalties.
Philliskirk went first and scored, while Conor Hourihane who missed a penalty at the weekend against Rochdale, levelled.
Kelly scored for Oldham before Winnall went from hero to villian as he missed his spot kick.
Jones made it 3-1 to the home side and it stayed that way as substitute Kane Hemmings missed for Barnsley.
However, Ross Turnbull kept the visitors in it when he saved from Wilkinson and Abbott brought it back to 3-2.
Oldham still only needed one more to win though and Rhys Turner duly fired home to send Lee Johnson’s men through to the next round which was tough on Barnsley who had been excellent in the second half.
Oldham (4-3-1-2): Rachubka; B Wilson, Dieng, J Wilson, Mills; Dayton, Jones, Tidser; Philliskirk; Poleon, Wilkinson.
Subs: Coleman, Brown, Kelly, Winchester, Turner.
Barnsley (4-4-1-1): Turnbull; Bree, Brown, Nyatanag, Dudgeon; Williams, Bailey, Berry, Treacy; Hourihane; Winnall.
Subs: Davies, Hemmings, Abbott, Ramage, Cole.
Referee: Gary Sutton (Lincolnshire).