Callum Wilson grabbed a priceless stoppage-time winner as West Ham kept their heads above the relegation zone with a 2-1 victory over Everton.
Kiernan Dewsbury-Hall’s late equaliser, which cancelled out Tomas Soucek’s header, looked to have swung the survival battle Tottenham’s way moments after they had taken the lead at Wolves.
It was a goal which briefly dropped West Ham below Spurs and back into the bottom three.
But substitute Wilson, who had scored eight goals in his previous seven appearances against Everton, struck two minutes into time added on to keep the Hammers two places above their London rivals.
It was a hammer blow for David Moyes, making his first return to the London Stadium since he left two summers ago and on his 63rd birthday.
The reunion brought up his 750th match as a Premier League boss, but their bid to qualify for Europe took a dent with a dramatic late defeat.