Burton Albion climbed off the foot of the League One table as Charlie Webster's late goal stunned fourth-place Cardiff in south Wales.
The Bluebirds had the chance to go back top of League One with victory, and had good chances to take the lead through Yousef Salech and Joel Bagan.
But as the game wore on the frustration inside the Cardiff City Stadium grew, and the Brewers looked more and more off a threat on the counter attack.
And with 82 minutes played, Charlie Webster made the most of a bouncing ball in the Cardiff box to fire past Nathan Trott.
Victory lifts the Brewers to 22nd, one point away from safety, while the Bluebirds miss the opportunity to return to the summit, and instead remain fourth.
Brian Barry-Murphy made five changes to the Cardiff team that beat Wigan on Saturday, and the fresh legs started strongly.
Salech had two close-range headers saved by Bradley Collins, the second of which he would have wanted back after heading straight at the Burton goalkeeper.
The best chance of the first half for the Bluebirds fell to Bagan. Collins could only parry a Rubin Colwill free-kick to the feet of the Cardiff full-back, but his effort from near the penalty spot sailed over the bar.
Burton, who made three changes from 4-0 hammering against Plymouth on Saturday, almost took the lead against the run of play midway through the first half.
Sebastien Revan's corner found a late-arriving George Evans at the back-post, but the Brewers midfielder was denied by an excellent reflex save from Nathan Trott.
At the other end Burton continued to offer reminders of their own threat, and Webster should twice have done better after finding space on the edge of the Cardiff box, instead sending a pair of wild efforts well wide.
The second half started much like the first, and Cardiff should have taken the lead when Salech's cushioned header fell perfectly for Cian Ashford, but the young winger's effort went straight at Collins.
Burton were camped in their own half, but an increasingly frustrated home crowd were crying for those in blue to strike from the edge of the area.
Chris Willock duly obliged on 52 minutes, curling a right-footed effort towards the far corner, but once again Collins was on hand to keep the game goalless.
Barry-Murphy rang the changes on 65 minutes, with Callum Robinson, Ronan Kpakio and Omari Kellyman replacing Ashford, Perry Ng and Wintle.
Robinson almost unpicked the Burton defence, chipping a no-look ball through to Salech, but the Cardiff striker could not make meaningful contact to knock it past Collins.
And with the game seeming destined to finish goalless, Webster landed the knockout blow at the other end, the ball falling to him after a number of ricochets, and the former Chelsea academy player made no mistake on this occasion.
Cardiff return to the Cardiff City Stadium on Saturday, 4 October as they welcome Leyton Orient, while Burton travel to Doncaster Rovers on the same day.
Cardiff City: Trott, Ng (Kpakio 67’), Fish (Nyakuhwa 89’), Lawlor, Bagan, Wintle (Kellyman 67’), Turnbull (J.Colwill 77’), R. Colwill, Ashford (Robinson 67’), Willock, Salech. Subs Not Used: Turner, Chambers.
Burton Albion: Collins, Armer, Delap, Hartridge, Revan, Evans (Sibbick 90’), Webster, Lofthouse, McKiernan (Williams 75’), Tavares (Godwin-Malife 59’), Beesley. Subs Not Used: Amissah, Taroni, Krubally.