Second-half goals from Will Vaulks and Callum Paterson earned Cardiff a 2-0 win at Barnsley that boosts their hopes of reaching the Sky Bet Championship play-offs.
However, the result leaves Barnsley with a real battle to avoid relegation over the final leg of the season.
Barnsley started the game five points from safety after losing at Reading last time out while Cardiff began five points off the top six.
Tykes striker Cauley Woodrow fired in a firm drive which flashed wide of Alex Smithies' right-hand post but apart from that it was a quiet opening, with neither keeper tested early on.
Barnsley's Michael Sollbauer was able to continue after receiving treatment following a collision inside his own area.
Cardiff's Dion Sanderson headed away as Jacob Brown looked to get on the end of a cross.
In the home side's next attack, Luke Thomas cut inside from the right wing and tried an angled shot which went beyond the far post.
Cardiff's first effort of note came when Albert Adomah broke free on the right-hand side of the area and fired in a shot which Brad Collins did well to beat away at his near post.
The resulting corner was met by Sanderson, who put his header over.
Soon after the restart, Sean Morrison's flick-on was met by Paterson, whose tame header was comfortably gathered by Collins. At the other end, Marcel Ritzmaier put a shot wide.
The visitors had a great chance when Joe Ralls sent over a low cross to Junior Hoilett, who lifted the ball over from a good position.
Cardiff had an appeal for a penalty turned down when Paterson appeared to be felled in the area by Collins.
Vaulks put the visitors ahead in the 65th minute, firing into the net following a goalmouth scramble after Adomah caused problems for the Barnsley defence.
Paterson added a second goal a minute later when he received a through-ball from Morrison, went one-on-one with Collins and slipped the ball past the oncoming keeper.
Barnsley boss Gerhard Struber sent on Elliot Simoes in place of Brown in a bid to add a fresh attacking dimension to his side.
Thomas had a shot which was deflected off-target before Struber made another attacking change, with Patrick Schmidt taking over from Conor Chaplin.
The substitutions failed to have the desired effect, however, with Barnsley never threatening to force their way back into the game.
What the managers said...
Barnsley's Gerhard Struber: "I was disappointed with the result and the performance in the second half. I think we showed our fans two faces in this game. In the first half we were okay and in the second we stopped completely our plan. We forgot our style to play.
"They were ready for this fight, played many long balls and won the aerial duels. Our strength is to play in good positions and play quick and we forgot everything in the second half. The whole second half was not enough to win this game. It's a disappointing moment for me and my team. It was easy for Cardiff - too easy in the second half. I have no answer for that right now."
Cardiff's Neil Harris: "In the first half it wasn't a very good game. It was very scrappy. You can't under-estimate the conditions. The pitch was very awkward to play on - we saw that in the warm-up - and the with the wind in the first half it was really tough in the first half to get any momentum. I thought we had a couple of moments of quality in the first half and could have done better.
"Credit goes to Barnsley for standing strong against us but I didn't feel they affected the game too much with the ball. We spoke at half time about being better on the first contacts and the second balls and having a little bit more quality and composure. I was very pleased with the second half because we had some real good moments of attacking football. There were two quality moments when we scored the goals."