Southampton ended their goal drought at St Mary's and increased 10-man West Ham's misery with a 3-2 Premier League victory secured by a stoppage-time penalty from Charlie Austin.
An inability to score in their past six home games had contributed to the dismissal of Claude Puel and continued in last week's 0-0 draw with Swansea in new manager Mauricio Pellegrino's first match in charge, despite 29 shots on goal.
In West Ham they then found accommodating opposition, whose hopes of recovering from a 4-0 defeat at Manchester United suffered when the reckless Marko Arnautovic was sent off in the first half.
The club-record signing was given a red card in the 33rd minute after he appeared to elbow Jack Stephens when they already trailed to Manolo Gabbiadini's opening goal.
Austin's late penalty, following Dusan Tadic's in the first half, then secured a first league victory of the season for fifth-placed Southampton, who almost drew once again after Javier Hernandez's two goals took the visitors level.
It was the arrivals of Hernandez and Arnautovic, combined with Joe Hart and Pablo Zabaleta, that had given Slaven Bilic's team cause for optimism, and the loss at Old Trafford had taken much of it away.
That Winston Reid suffered a calf injury in their pre-match warm-up and had to be replaced by Angelo Ogbonna was already discouraging, but they showed admirable resilience when bad turned to worse.
In the 11th minute Gabbiadini collected possession in midfield and found Nathan Redmond, who after delaying until the Italian's run took him into the penalty area, returned his pass and watched his team-mate calmly finish low beyond Hart.
Arnautovic had remained on the floor for treatment when Mario Lemina caught him with an elbow while both jumped for a header, but after recovering and playing on, he proved a liability when his late challenge on Stephens led to his dismissal.
Former Southampton captain Jose Fonte then combined with Ogbonna to pull Steven Davis back in the area, leaving referee Lee Mason little choice but to award Southampton a 38th-minute penalty. Striking the ball down the middle, Tadic doubled their lead when the diving Hart's foot could only deflect the ball high into his own net.
Even on the stroke of half-time, when Hernandez calmly tapped in from close range after Fraser Forster had palmed Michael Antonio's hopeful turn and shot from the edge of the area into the striker's path, the visitors' situation looked bleak.
Gabbiadini had threatened to extend Southampton's lead midway through the second half when curling against the crossbar from 30 yards, but by the 74th minute West Ham had equalised.
After their substitute Diafra Sakho had headed against the crossbar, Hernandez reacted to reach the rebound and strike into the roof of the net.
A draw continued to appear likely even as Southampton stretched their visitors, with substitute Shane Long having a header disallowed when Ryan Bertrand clumsily fouled Hart and Redmond also striking the crossbar from distance.
The declining Zabaleta then combined with Fonte in stoppage time to bring down Maya Yoshida as the defender chased James Ward-Prowse's cross, giving Southampton another penalty and the chance to earn all three points.
Like Tadic, substitute Austin powerfully struck down the middle beyond Hart, leaving the England goalkeeper's new club bottom of the league.