Graham Potter suffered defeat in his first game as West Ham boss as Aston Villa came from behind to reach the FA Cup fourth round.
Two goals in five second-half minutes from Amadou Onana and Morgan Rogers completed the hosts’ comeback, although the Hammers were furious referee Tim Robinson incorrectly awarded a corner in the build-up to Onana’s leveller.
Lucas Paqueta’s ninth-minute opener had the visitors deservedly ahead but Potter’s new side were unable to hold on in the second half.
It had looked like Potter, only officially appointed on Thursday and with one training session to prepare, would make an instant impact.
He had waited for his next managerial opportunity after almost two years out since being sacked by Chelsea and having been in the running for jobs at Ajax and Leicester.
It was almost worth the wait after an electric start but the Hammers faded badly after the break, regardless of the officials’ mistake.
The loss of striker Niclas Fullkrug to an apparent hamstring injury will also give Potter a problem with Jarrod Bowen already out with a fractured foot and Michail Antonio a long-term absentee.
He will rightly feel aggrieved at Aston Villa’s leveller – with Ezri Konsa also tangling with Paqueta – but the Hammers struggled to match the hosts’ intensity even before Onana’s 71st-minute equaliser.
Rogers pounced to win it soon after while Jacob Ramsey also hit the post late on.