Match ends, Birmingham City 1, Barnsley 2.
Birmingham City's winless run was extended to six games as Barnsley came from 1-0 down to secure victory with Cauley Woodrow's penalty and Callum Styles' deflected winner.
In a game of few chances, Blues went in front on 56 minutes with their only effort on target - a beautiful move finished off nicely by striker Scott Hogan's second goal of the season.
A clever backheel by Jonathan Leko through the legs of Tykes defender Mads Andersen down in the right corner set Maxime Colin free in space and he squared to his left for Hogan at the near post to slide home a low, well-struck right-foot shot.
But the game was turned on its head when Barnsley won a contentious 71st-minute spot-kick.
Callum Brittain took on Kristian Pedersen on the right edge of the box, checked back on himself, fell to the turf and earned the penalty.
Woodrow sent home keeper Neil Etheridge the wrong way to level the scores - and there was worse to follow for the hosts.
Blues failed to clear their lines from a dangerous long throw - and Styles' low left-foot shot skewed in to earn Barnsley their first win in three games.
The Tykes rise to 13th, having now won five of their eight league games under new boss Valerien Ismael, within seven points of a play-off place.
Barnsley ended the night three points ahead of Aitor Karanka's Blues, who are in 18th, just a place above St Andrew's tenants Coventry City - and six points above the drop zone.
After ending October with two straight wins, their untimely winless run since includes four home games where they have picked up just one point out of a possible 12 at St Andrew's.
Blues now face a tough trip to Ashton Gate this Saturday to face high-riding Bristol City, while Barnsley are back in action the evening before at home to Bournemouth.
Birmingham City boss Aitor Karanka told BBC WM:
"They were much better than us. It's difficult to understand. In the first half we could not pass the ball more than two or three times.
"I tell the players to be more aggressive and be stronger on the pitch. We needed to create more. It's frustrating.
"We shouldn't arrive to the point whether or not it was a penalty. We should have cleared the ball sooner. We have no excuses."
Barnsley boss Valerien Ismael told BBC Radio Sheffield:
"The goal we conceded was absolutely ridiculous. We have to do that better. But I'm very happy that we turned the game.
"It's a long time since Barnsley turned a game after being one down. We got fresh legs on and I am very happy with the mentality we showed.
"It's important for the rest of the season that we now know we can do that."
- 15Clarke-SalterSubstituted forFriendat 80'minutes
- 19San José
- 3PedersenSubstituted forBelaat 80'minutes
- 18McGreeBooked at 68minsSubstituted forSunjicat 81'minutes
- 14LekoBooked at 77minsSubstituted forToralat 85'minutes
- 9HoganSubstituted forJutkiewiczat 85'minutes
- 6AndersenBooked at 58mins
- 27MowattSubstituted forPalmerat 77'minutes
- 8KaneSubstituted forJamesat 77'minutes
- 29AdeboyejoSubstituted forFrieserat 78'minutes
- 11ChaplinSubstituted forThomasat 77'minutes
- 9WoodrowSubstituted forHalmeat 86'minutes
- Tony Harrington
- Shots on Target
Second Half ends, Birmingham City 1, Barnsley 2.
Foul by Lukas Jutkiewicz (Birmingham City).
Michael Sollbauer (Barnsley) wins a free kick in the defensive half.
Offside, Barnsley. Matty James tries a through ball, but Dominik Frieser is caught offside.
Lukas Jutkiewicz (Birmingham City) wins a free kick in the defensive half.
Foul by Aapo Halme (Barnsley).
Substitution, Barnsley. Aapo Halme replaces Cauley Woodrow.
Foul by Jon Toral (Birmingham City).
Romal Palmer (Barnsley) wins a free kick in the defensive half.
Substitution, Birmingham City. Jon Toral replaces Jonathan Leko.
Substitution, Birmingham City. Lukas Jutkiewicz replaces Scott Hogan.
Goal! Birmingham City 1, Barnsley 2. Callum Styles (Barnsley) left footed shot from outside the box to the bottom left corner. Assisted by Cauley Woodrow.
Foul by Jonathan Leko (Birmingham City).
Dominik Frieser (Barnsley) wins a free kick in the defensive half.
Substitution, Birmingham City. Ivan Sunjic replaces Riley McGree.
Substitution, Birmingham City. George Friend replaces Jake Clarke-Salter.
Substitution, Birmingham City. Jérémie Bela replaces Kristian Pedersen.
Iván Sánchez (Birmingham City) wins a free kick in the defensive half.
Foul by Luke Thomas (Barnsley).
- Missed Industry?: Fast-living, expensive exploits and fallouts await in this hit new drama
- Barack Obama Exclusive: The former president on his cautious optimism for the future and more