Graham Potter faced defeat in his first match as West Ham manager as Aston Villa came from behind to secure a place in the FA Cup fourth round.
The hosts completed their comeback with two quick-fire goals in the second half, as Amadou Onana and Morgan Rogers found the net within five minutes.
However, West Ham were left fuming after referee Tim Robinson awarded a controversial corner leading up to Onana’s equalizer.
Lucas Paqueta’s ninth-minute goal had given the visitors a deserved early lead, but Potter’s side couldn’t maintain their advantage in the second half.
Potter, who was only officially appointed on Thursday and had just one training session with the team, had hoped for an immediate impact.
After nearly two years out of management following his sacking by Chelsea, he had been linked to jobs at Ajax and Leicester, making this his long-awaited return.
Although West Ham made a strong start, they faded after the break, regardless of the refereeing decision.

Potter also faces further challenges, with striker Niclas Fullkrug appearing to suffer a hamstring injury, adding to the absence of Jarrod Bowen (fractured foot) and long-term injury to Michail Antonio.
Potter may feel aggrieved by Villa’s equalizer, especially after Ezri Konsa tangled with Paqueta in the build-up, but West Ham struggled to match the hosts’ intensity even before Onana’s 71st-minute goal.
Rogers sealed the win soon after, while Villa’s Jacob Ramsey hit the post late in the match.