Cardiff held on for a 1-0 win over Aston Villa to move clear of the Championship relegation zone.
Joe Ralls scored the game's only goal, the midfielder putting the Bluebirds ahead in the first half.
The home side were full value for their half-time lead and although they had some nervy moments in the second, they stayed tight in defence and goalkeeper Brian Murphy made two excellent saves to seal the three points.
Villa, without Middlesbrough-bound striker Rudy Gestede, felt they should have had an early free-kick when Jack Grealish went down on the edge of the box.
Referee Andy Davies waved away those appeals and with the home side looking dangerous from set-pieces, they soon moved ahead.
A Joe Bennett corner from the right was not cleared, the loose ball causing havoc in the Villa box.
A goalmouth scramble followed, the rebound hitting Ralls and finding the bottom corner without the Cardiff man knowing much about it.
The goal seemed to give Neil Warnock's side belief and Junior Hoilett tested Mark Bunn before Kadeem Harris should have done better from a Lee Peltier pull-back.
Ashley Westwood shot over and Leandro Bacuna saw his free-kick deflected for Villa but the home side should have added a second before the break.
Kenneth Zohore hit the bar from just a few yards out and just a minute later, the striker was through on goal again though his shot was blocked.
Villa needed to improve for the second half and Steve Bruce's introduction of Gabriel Agbonlahor and Aaron Tshibola at the break said everything about their display to that point.
Their arrival had little impact though as Cardiff got to the hour mark still with a one-goal lead.
Aron Gunnarsson had shot wide for Cardiff, but their advantage nearly disappeared when Ross McCormack's free-kick beat Murphy but not the crossbar.
Almost all of Davies' decisions were now going against the home side, much to the crowd's anger.
It created a hostile atmosphere for the final 20 minutes, Harris bringing a save from Bunn before Murphy then denied Agbonlahor's curling effort with an acrobatic dive.
Villa, who have designs on a play-off spot, were the ones now dominating the ball and Agbonlahor tested Bunn again and Tshibola fired wide
The chances kept coming and Alan Hutton appealed for a penalty late on but Steve Bruce's side just could not break through.