Charlton 5 Cardiff City 4
There was a point just before the half hour mark when the question on everyone's lips was how many Charlton would lose by rather than whether they would lose.
The Addicks had stumbled from disaster to disaster in a run at The Valley which had seen them without a win in six.
And up against the League One leaders Cardiff, 2-0 down, with the away fans loudly predicting relegation for the Addicks come May, the odds were that run would continue.
But a slightly fortunate comeback late in the first half, followed by a second half goal-fest saw the Addicks edge out the Bluebirds on a chilly Tuesday night in SE7.
Pre-match, Chris Powell brought in Dale Stephens for Lawrie Wilson, who went off injured in Saturday's defeat to Middlesbrough, while Danny Haynes came into the starting line-up with Bradley Wright-Phillips dropping to the bench.
The addition of youth players Morgan Fox and Adebayo Azeez to the substitutes' bench gave an insight into the extent of Charlton's deepening injury situation.
Cardiff were not without their own absentees with Jordon Mutch, Craig Bellamy and Tommy Smith all out injured.
But as the Addicks looked for a bright start following the weekend's 4-1 defeat, Cardiff had other ideas.
Ben Hamer was called into action with three minutes of the start pushing a Craig Noone shot from the edge of the area around the post. But he couldn't do anything from the resulting corner from Peter Whittingham which was flicked on at the near-post by Bluebirds' striker Heidar Helguson and beyond the Addicks' keeper.
It was a goal that would infuriate manager Powell coming from another set-piece, which is becoming all to regular an occurrence for Charlton this season.
It was only 20 minutes later that weakness was cruelly exposed again as Whittingham swung in another corner from the same side.
A flick-on by Helguson was met by former Addick Mark Hudson who headed it against the bar. Helguson turned it back across goal and Hamer was only able to punch it to Cardiff's Joe Mason who tucked the ball away for his side's second.
The league leaders looked very comfortable with Charlton now defending desperately.
The Addicks were also lacking in the final third as well and only created their first real chance on 30 minutes when Bradley Pritchard broke down the right-hand side but defender Ben Turner got their just ahead of Charlton's Johnnie Jackson, heading the ball to safety.
With Charlton struggling to carve out chances, Michael Morrison, playing at right-back, launched a hopeful cross into the area with only Rob Hulse to aim for.
But the striker did enough to put off Cardiff stopper David Marshall who dropped the ball at the feet of Jackson on the edge of the area.
Despite a crowd of defenders on the line, the Charlton captain cooly placed the ball into the top corner of the net with his weaker right foot with five minutes of the half remaining.
But it didn't a signal the tide changing just yet and within moments Whittingham sliced an effort wide when well-placed and Helguson headed tamely across goal when free in the area.
At the other end, Charlton striker Rob Hulse rounded the keeper but his shot from a tight angle was cleared behind for a corner.
Just as Charlton were looking like going in a goal down at the break, Salim Kerkar's resulting corner was headed home by the unmarked Jackson.
The second half saw Charlton start the strongest but Whittingham had the first good chance, his shot from distance deflecting wide of Hamer's post and the Cardiff midfielder's resulting corner hitting the top of the bar.
But the tale of the set-pieces was to continue as Chris Solly won a free-kick on the left-hand touchline, half-way into the Cardiff half.
Stephens looked as shocked as anyone when his over-hit free-kick sailed over keeper Marshall's head and into the net to put Charlton in front.
Cardiff were rattled and on 58 minutes they looked in big trouble. Solly's pinpoint cross-field ball found Pritchard who took the ball on his chest before volleying the ball back across goal.
Striker Haynes was unmarked and had time to stumble before steadying himself to nod past Marshall from close range.
While the Cardiff fans screamed for manager Malky Mackay to "sort it out", the Welsh side's boss prepared to make a double substitution, but as they warmed up Charlton turned the screw.
Kerkar swung in a cross from the left, picking out Hulse, who had also lost his marker, and he headed home from close range with just an hour gone.
Cardiff upped the tempo and a Mason effort was well saved by Hamer, while at the other end a Cort volley from a corner was saved well low by Marshall.
With the realities of the collapse sinking into the away side, they began to lose hope and Charlton were happy to take the sting out of the game.
Chances were few and far between. A Mason effort from the edge of flying inches over barely raised a murmur from the Cardiff fans.
In the six minutes of injury time there was a small cheer from the remaining away fans when Noone rounded Hamer and slotted home.
Moments later they were given real hope when substitute Aron Gunnarsson raced through to level the scores.
With Charlton now sensing the worst, a Whittingham cross was fumbled then caught by Hamer and a Noone long ranger sailed just over the bar.
The relief around the ground was palpable when referee Keith Stroud blew his whistle for full-time in a pulsating battle at The Valley, which saw Charlton come back from the dead only to nearly throw it away again.