Ten-man West Ham twice came from behind but Charlie Austin’s injury time penalty gave Southampton their first victory under Mauricio Pellegrino.
Having failed to score in their last six home matches, Saints took the lead after only 10 minutes when Manolo Gabbiadini side-footed past Joe Hart.
West Ham’s problems then spiralled, as Marko Arnautovic was sent off for elbowing Jack Stephens, before Dusan Tadic made it 2-0 from the penalty spot after Jose Fonte brought down Steven Davis.
Summer signing Javier Hernandez thought he had snatched an unlikely comeback for the visitors with two goals from close range either side of half time.
But the Hammers conceded a second penalty when Pablo Zabaleta bundled into Maya Yoshida and substitute Austin coolly slotted past Hart.
Were the big calls right?
Referee Lee Mason had some important decisions to make throughout the dramatic match at St Mary’s – and he got most of them right.
Mason was left with little choice but show a straight red to Arnautovic on 33 minutes, after the Hammers’ record signing needlessly raised his elbow into Stephens’ neck.
The first penalty was also an easy one to give, as former Saints defender Fonte pulled down Davis, but the second spot-kick in the 91st minute was a more contentious matter.
Zabaleta caught a rising Yoshida in the back, as he went to head the ball from close range, and Mason decided the Hammers defender had impeded his Southampton counter-part.
West Ham had earlier had a handball appeal against Stephens waved away, while the referee did not punish Mark Noble for his rash challenge on new Saints midfielder Mario Lemina in the first half.
BBC Sports