Cardiff returned to winning ways to stay with Sky Bet Championship leaders Leeds after defeating Sunderland 2-1 at the Stadium of Light.
The Black Cats, without a win since last December on home soil when they were struggling in the Premier League, slipped into the bottom three after another frustrating afternoon on Wearside.
Sunderland had briefly threatened to claim a point when Lynden Gooch scored his first league goal for the club with a penalty seven minutes after half-time.
But Cardiff, who had opened the scoring in the seventh minute through Craig Bryson, reclaimed the lead with a penalty of their own through Joe Ralls 17 minutes from the end.
Cardiff, who had not won in three but had lost only once all season, sprayed the ball around more confidently and regularly had efforts on goal during the opening 20 minutes, while the home side struggled to make any impression on Neil Etheridge's goal.
The Bluebirds did not have to wait long to hit the opener and it came through a clinical counter after one of Sunderland's better attacks of the half.
When Adam Matthews burst down the right and delivered a low cross towards Gooch, the ball eventually went to safety and Etheridge took a quick goal-kick into the Sunderland half.
Striker Kenneth Zohore, a real handful for the home defence, made the first flick and the lively Nathaniel Mendez-Laing helped it on again into the path of Bryson, who struck first time beyond Robbin Ruiter.
It was a cool finish and lifted Cardiff. The only surprise was that they did not add a second during their spell of heavy pressure.
Midfielders Aron Gunnarsson and Bryson had efforts go close moments after the opener when sections of Sunderland's crowd started to boo and criticise the club's owner Ellis Short again - and that was inside 13 minutes.
Grayson scrapped the three-man defence he started with and Sunderland did improve, without causing too many problems for the Cardiff back line.
On the one real occasion they did go close to scoring Bryan Oviedo, moved to left midfield from wing-back, turned 25 yards from goal before seeing his dipping shot bounce back off the post and to safety.
But Sunderland were sparked briefly into life after the restart when Gooch took matters into his own hands.
After forcing Etheridge into a save from a tight angle he was hauled down in the area eight minutes into the second half by Cardiff skipper Sean Morrison. Gooch sent the keeper the wrong way from the spot.
But Morrison made amends with 17 minutes remaining. He was gifted a penalty when he was shoved to the floor by Lamine Kone, who was booked, and then Ralls converted with power to reclaim the lead and that was how it stayed.