Second-half goals from Issa Diop, Angelo Ogbonna and Javier Hernandez dug West Ham out of a hole as they beat AFC Wimbledon 3-1 in the Carabao Cup.
Bottom of the Premier League after three straight defeats, a trip to Sky Bet League One Wimbledon was supposed to provide some sort of pick-me-up for the Hammers - but for a while they looked destined for a humiliating defeat.
They fell behind after less than a minute and a half to a goal from Joe Piggott, who was playing non-league football last season.
Yet even after the Dons were reduced to 10 men after only 18 minutes, West Ham struggled to break them down until Diop equalised well into the second half.
Ogbonna headed a second with eight minutes left and Hernandez struck in stoppage time to ensure West Ham's already poor start to the season did not plumb new depths.
Around £42m worth of summer signings were on show at the start, and that figure doubled at half-time when record buy Filipe Anderson was sent on.
Yet they were behind after just 80 seconds when Mitch Pinnock swung in a corner and West Ham's defence failed to prevent former Newport, Southend and most recently Maidstone striker Piggott from planting a header home.
Wimbledon looked there for the taking after Rod McDonald managed to earn two bookings in the space five first-half minutes, the second for a foul on Hernandez .
The Mexican was convinced he was fouled inside the area but referee Tim Robinson gave a free-kick which Aaron Cresswell curled wide.
The unlucky Piggott was sacrificed in Wimbledon's tactical reshuffle and the Kingsmeadow crowd prepared for an onslaught.
It never really came in the first half, though. Summer recruit Andriy Yarmolenko was West Ham's main threat but he curled one shot over, saw another saved by Tom King and had a header cleared off the line.
On came Anderson and West Ham immediately looked sharper and more inventive, although Hernandez somehow fired wide from all of six yards out.
It had taken an hour for West Ham to fashion a decent chance, and two minutes later they finally hauled themselves level.
Defender Diop - who scored an own-goal on his debut at Arsenal last weekend - drilled a low shot from 25 yards into the bottom corner.
Diop almost got a second moments later but his header crashed back off the crossbar.
Instead it was his defensive parner Ogbonna who headed in from a corner before Hernandez rounded King at the death to finally register a first win of the season for Manuel Pellegrini's expensively-assembled side.