Dimitri Payet’s last-ditch free-kick handed West Ham a 1-0 EFL Cup third round win against Accrington Stanley at the London Stadium.
Slaven Bilic’s side went into the game on the back of four successive defeats in all competitions and they were looking to stop the rot against League Two opposition.
However, the Hammers were frustrated throughout and looked poised to go into extra time until substitute Payet sealed the win with a trademark free-kick.
West Ham looked disjointed in the opening stages but had the first real opportunity on 17 minutes when Sofiane Feghouli’s right-foot effort from outside the area was saved by Elliot Parrish in the Accrington goal.
Billy Kee and John O’Sullivan then had respective attempts wide at the other end, before Simone Zaza hit a rising shot over the bar for the hosts.
The Hammers did come more into the contest as the half wore on but didn’t look like breaking the deadlock as Jonathan Calleri’s off-target strike on 34 minutes was the closest they came.
Sean McConville almost put Accrington in front on 55 minutes when he was played in down the left of the area and his strike was tipped wide of the far corner by Darren Randolph.
West Ham should have taken the lead on 74 minutes when Zaza was greeted with an open goal a few yards out, but fired his effort straight at Parish.
Michail Antonio stepped off the bench but sent a close range header just wide on 82 minutes before West Ham were reduced to ten men when Arthur Masuaka went off injured on 88 minutes after all the substitutions had been made.
But the Hammers continued to press and won the tie in the 96th minute when Payet curled a free kick from the edge of the area into the corner of the net.