Southampton's automatic promotion hopes suffered a huge blow in south Wales as Cardiff snatched a 2-1 comeback win.
Southampton were entirely dominant in the first half but, because of some poor finishing, only led 1-0 thanks to Joe Aribo's 12th-minute strike.
The Saints paid the price for missing a series of chances as sub Famara Diedhiou levelled from close range.
Teenager Cian Ashford then won it for Cardiff in injury time with a deflected shot from 25 yards.
Defeat leaves them five points off the automatic promotion places with three games remaining.
Saints boss Russell Martin had described this fixture as Southampton's "biggest game of the season" as the former Swansea manager made his return to Wales.