Even as he was revelling in the moment his new West Ham side executed his game plan almost flawlessly to achieve their first away win of the season, David Moyes could hear the chants rising from the home end and the dark days of his own career were suddenly in his thoughts.

Mark Hughes guided Stoke to their highest Premier League finish in each of his first three seasons as manager but his team are struggling now and the tide of popularity has turned in a way that Moyes knows only too well.

“I have been there before and know what it is like,” Moyes said. “Stoke City were in the game the whole way. But goals change the way it goes and they were doing everything they could to score, and we did everything we could to keep it out.

“I am sure Mark will think he didn’t deserve it. He is a really good manager – look at the level he works at and the time he has been the in the job and to do that is a big achievement.

“But sometimes the way the result goes football can do that. Sometimes it is cruel to you.”