Barnsley were on the receiving end of an unlikely smash and grab raid from Port Vale at Oakwell.
Paul Hart's Yorkshiremen had dominated for long periods and created a host of chances but they had managed only a slender one-goal lead thanks to Barry Conlon's late first-half penalty.
And they were made to pay mid way through the second period when the Valiants grabbed two goals in as many minutes to turn the tables and steal the three points.
Barnsley had been bright and busy in the opening 45 minutes and put the Vale defence under some pressure.
Robbie Williams was just off target with one fierce left footer before on loan striker Michael Chopra brought a fine one hand parry from outstanding Vale keeper, Jonathan Brain.
The homeside continued to power forward and Conlon brought another fine stop from Brain with a far post header.
Other chances fell to midfielder Anthony Kay and Dale Tonge but both were not taken.
However, two minutes before half time, and after having two good penalty shouts turned down, Barnsley did make the breakthrough from the spot.
Dorset referee Kieth Stroud adjudged that Port Vale defender Michael Cummins had bundled over Kay in the box and despite furious appeals the penalty stood and Conlon sent Brain the wrong way for his seventh goal of the season.
Barnsley were also the better side in the opening stages of the second half but then an inspired substitution led to Vale's stunning 1-2 knockout blow.
Vale boss Martin Foyle sent on left winger Jeff Smith in the 64th minute and some 60 second's later he burst into the box and picked out Billy Paynter at the far post and the big striker made no mistake with a diving header.
New striker Nathan Lowndes then went clean through but Barnsley keeper Ross Turnbull pulled off a fine save.
But in the 67th minute Vale went 2 -1 up, Smith again galloping clear down the left and although his effort was half saved by Turnbull, the ball was turned into his own goal by defender Robbie Williams.
Barnsley were stunned and despite late pressure could not conjure up an equaliser.