Rochdale striker Anthony Elding dumped Barnsley out of the Carling Cup 1-0 at Oakwell.
Former Stockport and Leeds forward Elding, a free summer signing from Kettering, headed home against the run of play early in the second half to stun Mark Robins' npower Championship side.
Barnsley midfielder Jacob Butterfield had numerous first-half chances, but he fired over the crossbar with an early effort, saw another shot held by Rochdale goalkeeper Josh Lillis and was inches off target with a header in the 38th minute.
Lillis denied Adam Hammill as Barnsley picked up where they had left off after the restart, clutching onto another long-range drive after team-mate Nathan Doyle had skewed off target.
Barnsley manager Robins then replaced both Butterfield and Goran Lovre with Martin Devaney and Iain Hume respectively and Rochdale took advantage of the reshuffle by snatching an unlikely 56th-minute winner.
Joe Thompson swung over a cross from the right and Elding stole in to head the ball into the bottom corner.