Cardiff moved to within three points of Sky Bet Championship leaders Wolves after they held on to earn a hard-fought 2-1 victory over Barnsley.
Callum Paterson netted his second goal against the Tykes this season, before Marko Grujic fired in from long range to all but guarantee the Bluebirds' fifth successive victory.
However, Swansea loanee Oli McBurnie scored his fourth goal in three matches for Barnsley to make for a nervous finale at the Cardiff City Stadium. Neil Warnock's men held on to earn a vital win to heap the pressure on Wolves, who had led the league by 13 points in February.
Kadeem Harris almost gave the Bluebirds the advantage on his first start of the season, but hit the side-netting after he cut in and shot in the eighth minute.
Barnsley target man Kieffer Moore linked with his midfield moments later to make Cardiff goalkeeper Neil Etheridge stop Bradley Potts' low shot.
Kenneth Zohore was at the centre of the hosts' attacking threat as he aimed to score for the third game in a row.
He provided Craig Bryson with the opportunity to break the deadlock after Gary Gardner failed to clear a corner - but Tykes goalkeeper Nick Townsend saved his deflected effort.
The Danish forward then sent Harris one-on-one with Townsend and watched the winger's shot creep wide of the target.
However, the hosts finally got themselves in front after 31 minutes thanks to Paterson. A long clearance from Etheridge was played to Junior Hoilett, who looked for Zohore in the box.
Ethan Pinnock did well to close Zohore down as he lined up a shot on-goal but the ball fell kindly for the man who scored the winner at Oakwell to fire home from 15 yards.
It took only two minutes of the second half for the hosts to double their lead when Grujic was given the time and space to pick out the bottom corner from 25 yards out.
But the promotion candidates were pegged back by McBurnie. Tykes captain Andy Yiadom sent a dangerous ball into the box and the 21-year-old netted his fourth goal in three games to increase the nervous state of the home support.
The Scotland U21 international missed the chance to level moments later, before tempers flared when Moore charged into Etheridge.
There was still time for Cardiff to break away and go close through Craig Bryson, before Nathaniel Mendez-Laing struck the post at the death.
Cardiff City: Etheridge; Connolly, Manga, Bamba, Bennett; Bryson, Paterson (Damour, 62), Grujic (Halford, 56); K. Harris (Mendez-Laing, 70), Hoilett, Zohore
Subs not used: Murphy, Wildschut, Feeney, Pilkington
Barnsley: Townsend, Yiadom, Pinnock, Lindsay, Fryers; Williams, Potts, Gardner (Knasmullner, 46); Thiam (Hedges, 75), Moore (Bradshaw, 87), McBurnie
Subs not used: Davies, Pearson, Cavare, Mahoney
Yellow cards: Grujic, Gardner, Halford, Yiadom, Moore
Referee: Robert Jones