Southampton lost for the first time since 23 September as Bristol City scored three second-half goals to end Saints' club-record 25-game unbeaten run in all competitions.
Sam Bell, Rob Dickie and Harry Cornick got the goals as Saints' defeat, their first in 23 Championship matches, saw them slip to third in the table.
Saints had not lost since their four straight defeats in September - but their only consolation was a late Adam Armstrong penalty as they were overtaken by Leeds United, whose 4-0 win at Swansea lifted them to second.
Liam Manning's City move into the top half, up to 11th, after ending a run of four home games without a win.