Isaac Vassell headed a dramatic winner in the final seconds of his Cardiff debut to snatch a 2-1 triumph over Luton.
Graeme Jones' men looked to have earned a hard-fought draw thanks to Matty Pearson's header in the 86th minute after Aden Flint volleyed the hosts in front.
With the clock ticking down, Pearson rose highest to head Luke Berry's delivery into the bottom corner. But there was another twist in the tale as Vassell came on in stoppage time and converted Junior Hoilett's cross in the 96th minute to seal Cardiff's first victory since their return to the Championship.
Bluebirds boss Neil Warnock reacted to the opening day defeat at Wigan by making several changes to his starting XI.
Summer signing Robert Glatzel was tasked with leading the line for the first time and Marlon Pack was thrust into the heart of midfield after arriving on deadline day alongside Vassell. Alex Smithies made his first start in goal after Neil Etheridge's hamstring injury last weekend with Northern Ireland international Gavin Whyte also making his full debut.
Josh Murphy wasted a chance in the opening minute when he pulled a shot wide after Glatzel hustled Pelly-Ruddock Mpanzu out of possession and put his new colleague through on goal.
The Hatters almost got their noses in front when Callum McManaman latched onto a loose touch from Mpanzu, but Smithies smothered the ball and the drab first half ended without a goal.
The breakthrough came six minutes into the second period after Pearson brought down Callum Paterson deep inside the Luton half.
Murphy delivered a threatening ball in between the goalkeeper and his defensive line and centre-back Flint took advantage of the confusion to side-foot a volley home from six yards.
A lapse in concentration from Murphy allowed Luton substitute Harry Cornick to get in behind the defence and send a low cross into the danger area, but James Collins could only fire the ball inches wide.
Glatzel should have capped a positive debut with a goal after Hoilett delivered an inch-perfect cross into his path, but the German forward failed to make contact with the ball in front of an empty net.
And Cardiff were made to pay for their miss after Joe Ralls conceded a corner, despite his strong protests for a goal kick. Berry swung a dangerous delivery into the box and Pearson craned his neck to power the ball away from Smithies and into the bottom corner.
Warnock responded by pulling Glatzel off and sending Vassell into the fray after his deadline-day move from Birmingham. And the Cardiff striker made a move across the defence to get his head to Hoilett's in-swinging cross to secure all three points.