Peter Whittingham kept Cardiff’s slim play-off hopes alive with a stoppage-time penalty to earn a 2-1 win over Bolton Wanderers.
Zach Clough gave the relegated Wanderers a shock lead with a superb free-kick after just eight minutes.
Niall Maher received a straight-red card for an ariel challenge on Craig Noone after the break before Kenneth Zohore squeezed a shot through the legs of Bolton goalkeeper Ben Amos to level.
And the Bluebirds moved three points behind Sheffield Wednesday with two games to play when Whittingham stuck his injury time spot kick into the net.
Sheffield Wednesday’s draw at Derby in the early Championship kick-off meant nothing but a win would do for the Bluebirds in their unlikely bid to snatch a play-off spot.
Cardiff went on the attack in the opening stages and could have gone ahead through defender Matthew Connolly, but he could not steer Noone’s chip towards goal.
And the home fans were silenced two minutes later by promising Bolton forward Clough.
Lee Peltier brought veteran striker Emile Heskey down 20 yards from goal, and Clough left goalkeeper David Marshall rooted to the spot with an inch-perfect strike into the top-right corner.
It was Cardiff attack against Bolton defence from that moment on, and the odds turned in the Bluebirds favour in the 32nd minute.
The Trotters launched a rare attack and sent the ball high towards the Cardiff box. Noone jumped to clear before Maher crashed into the winger with his elbow raised, and referee Lee Collins did not hesitate to produce the red card.
Noone himself almost made Bolton pay when he cut in and drove a shot towards the top corner, but goalkeeper Amos was equal to it.
And relegated Bolton survived until half-time with their 1-0 lead intact.
Cardiff started the second-half as they ended the first, but it was the 10 men of Bolton who almost put themselves 2-0 up.
Heskey found Clough with space in the penalty area after a quick counter-attack, but Marshall got down to stop the 21-year-old from bagging a second.
And they were made to pay for the miss after 54 minutes when Noone gained possession and dribbled to the edge of the penalty area before he squeezed a delicate ball through to Zohore, who poked it through the legs of Amos for his second goal in Cardiff City blue.
It looked to be heading towards a draw despite wave after wave of Cardiff attack when substitute Kadeem Harris was brought down in the box, and Whittingham slotted the penalty into the bottom-right corner to take all three points.