Liam Lawrence was Stoke City's hero as he grabbed a controversial hat-trick to send the Potters into third spot in the table while Barnsley kept their unbeaten home run going.
Two of Lawrence's goals came from the penalty spot - the second six minutes into stoppage time - as Barnsley finished the match with ten men.
In a furious finish Steve Foster was red carded late on and, after the game, Stoke youngster Ryan Shawcross - on loan from Manchester United - was spoken to by the police for allegedly inciting the crowd.
Barnsley manager Simon Davey said after the match: "I'm speechless. As far as I'm concerned my players have won the game.
"We've competed for 90 minutes and we're disappointed we have only one point at the end of it.
"The referee gave two explanations for the penalty at the end. One was a free-kick and one was for a pull. He didn't know whose shirt was pulled.
"It's hard to swallow. I've never seen a referee change his mind so we have to move on. I don't want to get another fine."
Stoke boss Tony Pulis was delighted with the result, saying: "It was good for supporters but not managers. To score three goals away from home and not win is disappointing.
"There was no doubt in my mind about the last penalty. He's pulled Jon Parkin's jersey.
"We're delighted with the way we came back. They were in front three times so we showed great character. If we'd lost today I think it would have been a travesty and that's no disrespect to Barnsley."
The first of three penalties came after 23 minutes when Jon Macken was brought down in the area and Brian Howard scored his ninth of the season for Barnsley from the spot.
Lawrence equalised with a penalty of his own six minutes later after Ricardo Fuller had been brought down, but the home side were back in front after 66 minutes when Macken headed in.
Lawrence equalised again six minutes from the end but Macken headed the home side in front again a minute later.
Then, deep into stoppage time, Lawrence completed his hat-trick with the controversial penalty.