Paul Parry's early goal at Ninian Park kept Cardiff's Coca-Cola Championship play-off hopes alive and plunged struggling Southampton into even deeper relegation trouble.
Just six minutes had passed when Parry volleyed into the top-left corner from 12 yards to score the only goal of the game for Dave Jones' side.
The result was harsh on the Saints, whose best chances fell to Mario Licka and Stern John, and they have now been leapfrogged by Leicester and Coventry to slip into 21st position, just a place above the drop zone.
City, meanwhile, remain in the hunt for the play-offs as they extended their unbeaten run to six games.
It was the visitors who began the brighter, Licka curling a right-footed effort narrowly wide of the left post within a minute of the whistle.
Saints striker John then spurned a chance from 12 yards, and little more than a minute later the visitors found themselves behind.
Steven Thompson whipped in a cross from the right, and Parry volleyed home emphatically from 12 yards to hand the home side the initiative.
The goal was barely deserved on the run of play. But the Bluebirds, who face Barnsley in the FA Cup semi-finals next Sunday, were the stronger side as the half progressed.
Joe Ledley, passed fit after missing Wales' midweek friendly against Luxembourg, forced Southampton goalkeeper Richard Wright into action with a well-struck shot from 12 yards.
The City winger's outswinging corner almost led to a second in the 25th minute when Jermaine Wright cleared straight to Peter Whittingham - only for the former Aston Villa midfielder to fire over the bar.
Licka's free-kick was punched clear by Peter Enckelman, and Wayne Thomas' acrobatic attempt was comfortably caught by the City goalkeeper shortly before the half-time whistle.
Enckelman again came to the Bluebirds' rescue to punch another Licka corner and Tony Capaldi cleared Gregory Vignal's free-kick from the right.
The Finn showed excellent reflexes to parry another effort from John and Saints boss Nigel Pearson reacted soon afterwards by bringing on Bradley Wright-Phillips for Jhon Viafara.
Whittingham pulled a 20-yard strike past the post for Cardiff in the 63rd minute and seven minutes later he was replaced by Trevor Sinclair.
Opportunities remained at a premium as the two sides cancelled one another out and Pearson brought on Andrew Surman and Vincent Pericard for Euell and Licka respectively in a last-ditch bid to turn the game in his side's favour.
It was Cardiff, however, who almost doubled the advantage when Glenn Loovens headed Ledley's corner just over the bar.
Surman almost had the desired impact when his 25-yard drive came close and Enckelman was on hand to deny Adam Hammill from a similar distance as the Bluebirds hung on for a hard-earned victory.
Teams:
Cardiff Enckelman, Capaldi, Loovens, Johnson, Ramsey, Rae,Whittingham (Sinclair 70), McPhail, Ledley,Thompson (Scimeca 90), Parry.
Subs Not Used: Oakes, Purse, Feeney.
Goals: Parry 6.
Southampton Richard Wright, Thomas, Jermaine Wright, Vignal,Perry, Licka (Pericard 79), Hammill, Euell (Surman 77),Viafara (Wright-Phillips 60), Safri, John.
Subs Not Used: Davis, Ostlund.
Booked: Thomas.
Att: 12,955
Ref: Michael Jones (Cheshire).