Carl Dickinson struck a late winner with virtually the last kick of the game as Barnsley dealt a blow to high-flying Cardiff's Coca-Cola Championship promotion bid with a 1-0 victory.
The on-loan Stoke defender drove a fierce left-footed free-kick from 25 yards through a wall of players and into the corner of the net in the 90th minute.
The Tykes fashioned several decent opportunities throughout the game but looked to have been left frustrated until Dickinson's late intervention.
Barnsley were boosted by the return of influential skipper Stephen Foster, who came straight back into the side to replace the injured Darren Moore.
Hugo Colace shook off a groin niggle to keep his place in midfield alongside Nathan Doyle.
The Bluebirds were without former Barnsley midfielder Stephen McPhail, whom the club have confirmed is suffering from cancer, but included former Barnsley loan star Michael Chopra in their starting line-up.
Cardiff went close in the opening exchanges when midfielder Chris Burke fired a right-footed shot wide from 18 yards.
The visitors continued to probe and striker Ross McCormack engineered the space to drill a right-footed effort which drew a fine block from Barnsley defender Ryan Shotton.
The Tykes finally threatened themselves in the 13th minute when Cardiff defender Gabor Gyepes fouled Daniel Bogdanovic and Anderson De Silva flighted in a teasing free-kick.
Dickinson arrived to greet the ball with a left-footed shot which Burke blocked to avert the danger.
Moments later an outswinging corner from winger Adam Hammill was met by Da Silva but his header flew over the crossbar from 12 yards.
In the 18th minute, the Tykes again went close from a free-kick when Shotton headed Kozluk's delivery straight at Bluebirds stopper David Marshall.
The visitors were dealt a blow in the 21st minute when Kevin McNaughton withdrew because of injury and replaced by Paul Quinn.
McCormack then dragged a 30-yard shot wide before Barnsley fashioned another good opening in the 32nd minute.
Dickinson crossed dangerously and Bogdanovic headed straight at Marshall from 12 yards.
In the 36th minute, Hammill swung in a corner from the left flank and Shotton failed to hit the target as his header flew over the crossbar.
In the 39th minute, Cardiff midfielder Mark Hudson hit a fierce right-footed shot which flashed narrowly wide from 12 yards.
Ten minutes after the restart, Gyepes fouled Bogdanovic and Hammill's free-kick was met by Shotton's firm header.
The ball was comfortably saved by Marshall but the Tykes continued to ask questions of Cardiff's defence.
In the 62nd minute, Hugo Colace's fine shot from 25 yards was blocked by Gyepes and the Bluebirds survived again.
Genuine chances remained hard to come by but Dickinson grabbed the three points for his side in the last minute after Hudson handled the ball 25 yards from goal.
Copyright (c) PA Sport 2009, All Rights Reserved.