Barnsley claimed their first double over Cardiff City in 51 years as the Bluebirds' play-off hopes suffered at Cardiff City Stadium.
Striker Daniel Bogdanovic stunned the hosts with two goals within four first half minutes.
Malta's Bogdanovic caught Cardiff's defence napping before beating Peter Enckelman on the goalkeeper's first league appearance this season.
Bogdanovic then struck after latching on to Gabor Gyepes' clearance attempt.
Victory ended a three-game losing run for the visitors as they moved up two places from 13th to 11th in the Championship.
The Bluebirds are also now winless after their last three outings, but remain fifth after Leicester drew 1-1 at Plymouth.
Cardiff striker Michael Chopra missed an early chance as he ballooned a shot over the bar.
And Bogdanovic's efforts against the run of play left Cardiff reeling and the hosts left the field at the break to a chorus of boos from the home fans.
Dave Jones' side responded after the break, but even in their best spell were unable to convert a series of chances.
Keeper Luke Steele kept Chopra and Gyepes at bay and Gavin Rae's shot rebounded off the underside of the bar.
Having withstood the onslaught, Barnsley kept a clean sheet and the Bluebirds were also left to worry over Anthony Gerrard.
The defender took a blow to the head in the first half and was replaced at the break by Adam Matthews.
Cardiff City boss Dave Jones:
We handed them the game - Jones
"I'm just frustrated with some of the things we do.
"We get done with the same ball most times and people have got to learn their lessons and today was another example of that.
"We've not really played well. We've not created as much. We had 20 shots, but only worked the keeper six times.
"When we defend the way we defended we're going to give opportunities to the opposition and then it becomes a hard flogging and I don't think we deserved anything today because we didn't do the right things.
"They didn't really have to do anything. We've handed it to them and good luck to them. They've dug deep and they've come here and got the result.
"But it wasn't anything special - it was just us not being at it. They capitalised on that so good luck to them."
Tykes manager Mark Robins:
"I always knew we were capable of winning matches, although we have been on a poor run lately.
"I am pleased for the players and for the travelling support as we have taken them to the depths the last two away games.
"We knew we would have to defend as Cardiff have players who can score all over the field.
"Daniel Bogdanovic was excellent today and when he wants to compete he is a very intelligent player and it will be brilliant for the club if he continues like that."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.