Anthony Pilkington scored two penalties as Cardiff brought Preston North End's four-game winning run to a halt with a 2-1 win. Pilkington converted from the spot in each half to move Russell Slade's side to within three points of the Championship play-off places.
Cardiff have now lost just one of their last eight games and sit just one place below Sheffield Wednesday in sixth. The promotion chasers were evenly matched in the opening quarter of an hour, with Aron Gunnarsson's long-range volley for the Bluebirds the only chance of note.
Cardiff almost took the lead after 18 minutes when Pilkington's cross from the right evaded everyone but it bounced back off the post and into the arms of Preston goalkeeper Anders Lindegaard. Pilkington's influence was growing for the home side and he blazed over the bar shortly afterwards following a lovely one-two with strike partner Lex Immers.
Adam Reach had a half chance for the visitors midway through the half but he could only drag his effort wide of the goal. Lindegaard then produced a superb piece of goalkeeping to stop the home side taking the lead. Scott Malone's cross from the right was met by Pilkington but his header was pushed against the post by Lindegaard and then Immers' follow-up was turned around the post by another fine save.
Immers went close with just a few minutes left of the half with another firm header, this time from Lee Peltier's ball. Cardiff broke the deadlock two minutes before half-time when the impressive Pilkington was brought down in the box by Paul Huntington and the former Norwich forward got up to smash the spot kick past Lindegaard.
Preston started the beginning of the second period well but the first chance of the half fell to Pilkington at the other end and he brought another good save out of former Manchester United stopper Lindegaard. The visitors thought they had drawn level when Reach calmly slotted a deep cross past David Marshall 20 minutes into the second half but his effort was ruled out for offside.
Both sides were finding plenty of space in the middle of the pitch and Gunnarsson almost caught Lindegaard out with another long-range effort that zipped past the post. A tactical switch from Preston boss Simon Grayson to swap forward Jordan Hugill for midfielder Daniel Johnson put Cardiff under pressure but just as the visitors looked like getting an equaliser they conceded a second.
Pilkington sent Tom Lawrence into the Preston box and he was pulled back by Paul Gallagher for the game's second penalty, which Pilkington again put away with ease.
Substitute Callum Robinson set up a frantic finish with a smart finish from Greg Cunningham's low cross but Preston ran out of time to find an equaliser