Lee Tomlin scored in stoppage time as Cardiff came from two goals down to snatch a 2-2 draw at Reading.
A Callum Paterson own goal and a Mo Barrow effort gave the hosts a 2-0 lead but, after manager Neil Warnock was sent to the stands, the Bluebirds scored twice in the last seven minutes to earn a point.
Joe Bennett pulled one back before Tomlin's shot was deemed to have crossed the goalline after bouncing down off the crossbar.
The comeback saw Cardiff close the gap to Championship leaders Wolves back to four points and stopped Reading climbing into the top half.
Cardiff had won their previous four matches, conceding just one goal, as they kept up the chase behind pacesetters Wolves.
Reading were unbeaten in four games, winning their past two, as they recovered from a poor start to the campaign.
Cardiff made the livelier start in Berkshire but were not able to trouble the solid home defence.
Reading gradually pressed forward, with Barrow, the former Swansea winger, causing problems on the left flank. Twice Barrow escaped the marking of a rattled Bruno Manga but, on each occasion, the Cardiff rearguard just about managed to clear the danger.
Cardiff replied through a run from Nathaniel Mendez-Laing but his eventual shot was well saved by home goalkeeper Vito Mannone.
Reading's confidence grew and they went ahead in the 16th minute.
From Liam Kelly's corner from the left, Paterson - rising alone at the near post - inadvertently glanced a header past his own keeper Neil Etheridge.
Reading could have stretched their lead soon after but, from a curling Sone Aluko cross, Yann Kermorgant nodded tamely wide.
Cardiff did get more adventurous approaching half-time and Mannone kept out a long-range attempt from Manga.
But Reading doubled their advantage four minutes before the break after another Kelly corner caused panic in the Cardiff area. When the ball was only half-cleared, Barrow drove home a first-time 20-yard effort - with the help of a deflection off Bennett - for his sixth goal of the season.
The second half began at a hectic pace, with Mannone diving at the feet of the onrushing Joe Ralls to deny the midfielder an opening.
Warnock was growing increasingly agitated and eventually received his marching orders in the 77th minute for one too many protests aimed at referee Stephen Martin and fourth official Andy Woolmer.
But Cardiff responded with enthusiasm to grab a battling draw.
Bennett fired in a superb volley with seven minutes left and then Tomlin forced the ball home after Sol Bamba had hit the crossbar.