Substitute Patrick Kelly came off the bench to fire Barnsley into the third round of the FA Cup for the first time in three years with a 1-0 win at Peterborough.
Davis Keillor-Dunn, who had a goal chalked out for offside on the stroke of half-time, nodded over the first chance of the game for the visitors.
Declan Frith had the hosts’ best chance of the first-half as he fired into the side netting after a determined run down the wing.
After the break, Ben Woods fired a free-kick over the bar for Posh.
Kelly could only nod a cross straight at Alex Bass before the hosts’ keeper made a good save to keep out Jonathan Bland.
Neil Farrugia did well down the wing to tee up Kelly for a tap in to break the deadlock with 17 minutes to go.
Harley Mills had the hosts’ best effort to level when he struck straight at Michael Cooper.
Bass made a trio of late saves but it was not enough for Posh to avoid missing out on the third round for the first time since 2023.