Lowly Bristol City extended their unbeaten run to five games, condemning leaders Southampton to only their third league defeat of the season.
Saints had the better of the early play but City scored soon after the break.
Albert Adomah eluded his marker to fire in a deflected effort after Kelvin Davis had saved his initial shot.
For Saints, Guly Do Prado spurned a fine chance from six yards and Steve De Ridder blazed over before Nicky Maynard sealed it with a looping shot.
The Robins remain in the bottom three but their revival under new boss Derek McInnes continued in a lively encounter, which they dominated for long periods.
Saints started strongly, however, and former England goalkeeper David James needed to make a smart low save to deny Adam Lallana.
At the other end Davis had a scare when he almost spilt Ryan McGivern's cross into his own net, the ball dribbling narrowly wide of the post.
Adomah was presenting problems to the Southampton defence and he set up Marvin Elliott, who could only send a tame shot straight at Davis.
The Saints keeper also saved from Kalifa Cisse, while Maynard and Stephen Pearson wasted good opportunities.
City began the second period with similar vigour and Adomah wriggled free to put them ahead.
Jose Fonte had an immediate chance to equalise but sent his free-kick wide.
De Ridder failed to find the target from the edge of the area and the visitors were left to rue their misses when Maynard's shot deflected in to seal City's fifth league victory of the season.