
Gustavo Hamer's goal was his ninth of the season
Sheffield United kept their faint automatic promotion hopes alive with a victory that piled more pressure on relegation-threatened Cardiff.
Gustavo Hamer's instinctive first-half finish put the hosts ahead, the Championship player-of-the-season contender poking home after Tyrese Campbell's shot deflected into his path.
Brazilian Hamer also hit the woodwork with a free-kick as the Blades had the clearer sight of goal in a tense contest.
Cardiff battled throughout but lacked the quality to find a route back into the game, with their hopes of a comeback snuffed out when Ben Brereton Diaz swept in from close range with three minutes left.
Victory halted a three-match losing streak which has seen Chris Wilder's men fall behind Leeds United and Burnley in the race for the top two.
They remain third in the table with three games left, but five points behind leaders Leeds and the Clarets, who they visit on Monday in a crucial encounter.
While United are chasing a return to the Premier League, Cardiff are in danger of exiting the second tier via the opposite route having won only one of their past nine matches.
The Welsh club are down to 23rd in the table thanks to Luton's win at Derby, though the gap to safety is still only one point.
This was a meeting of two managers who have been critical of some of their own supporters in recent times, with Omer Riza issuing an apology just hours before kick-off after describing some Cardiff fans as "clueless" in his pre-match press conference.
Wilder, meanwhile, had been forced to defend his team's approach, insisting recent failings had been down to poor performance levels rather than a negative style.
Arguably, it was a case more of the same for United in the opening half hour, with Cardiff's desire and discipline giving Riza grounds for optimism.
Chances were at a premium, though Yousef Salech and Yakou Meite - in for the injured Callum Robinson - saw shots blocked as the Bluebirds showed promise.
But the mood shifted thanks to a sharp United move and a fortuitous double ricochet.
Hamer exchanged passes with Rhian Brewster, then fed Campbell for a shot which hit both Will Fish and Calum Chambers before dropping back to the onrushing Hamer, whose first-time effort rolled through Ethan Horvath's legs.

Yakou Meite (left) had sights of goal, but Sheffield United goalkeeper Michael Cooper was rarely troubled as Cardiff failed to score for the third time in their past four matches
Cardiff could consider themselves unfortunate to be behind, though it was Hamer left cursing his luck five minutes later when his curling set-piece hit the outside of the post.
The visitors continued to fight hard after the break, although only a smart Horvath save denied Harrison Burrows.
For all their endeavour, Cardiff lacked attacking threat, with Fish volleying over at a corner before Meite's header lacked the power to trouble Michael Cooper.
With desperation in the air and the visitors throwing players forward, United sealed victory when Kieffer Moore dispossessed Andy Rinomhota and drove into the Cardiff box.
The Wales striker's shot was blocked by Rubin Colwill, but Brereton Diaz - on his 26th birthday - was left to apply a simple finish as the ball rolled across the face of goal.
Sheffield United manager Chris Wilder:
"We had to take care of business from our point of view... a really emotionally draining week for everybody, the players and the supporters.
"I have got to say, I thought the supporters were outstanding in trying to raise us and give us energy.
"In my experience as a player, a coach or manager, I have had little periods where you lose games and sometimes the hardest thing is getting that first one over the line. We have done that.
"We needed a performance. The performance was OK and the result is a big result obviously which keeps us alive and kicking."
Cardiff City manager Omer Riza:
"I thought there were moments in the game when we played quite well. I thought we contained Sheffield well at times with our structure – they didn't cause us loads of issues.
"We always knew it was going to be a tough game out of possession and I thought we managed it quite well.
"Second half we tried to take the game to them and we had a lot of the ball. We probably didn't quite cause them enough problems going forward – our moments needed to be cleaner and more decisive.
"The [first] goal took the momentum away when we still felt we could try to get something from the game, then the second goal comes from a little error."