Jesse Lingard came off the bench to score a stunning late winner against his old side and David de Gea saved an injury-time penalty as Manchester United dramatically came from behind to beat West Ham.
Lingard, who spent a successful loan spell at London Stadium last season, appeared as a substitute in the second half and with two minutes remaining he cut on to his right foot and fired into the top corner.
Further drama followed as Luke Shaw was adjudged to have handballed in the box and De Gea dived the right way to push away the spot-kick that had been taken by Mark Noble, who was making his first touch after coming off the bench in the 95th minute.
Earlier in the contest, Cristiano Ronaldo had converted his fourth goal in three games since re-signing for Manchester United, poking home from close range on 35 minutes after Lukasz Fabianski had spilled the initial effort.
West Ham had taken the lead five minutes previously when Said Benrahma’s strike from outside the area went in after taking a huge deflection off defender Raphael Varane.
Bruno Fernandes had seen a first-time strike superbly tipped on to the post by Fabianski, who made a string of saves for the home side.
Victory ensures Ole Gunnar Solskjaer’s side remain unbeaten in the league this term with four wins and a draw, while West Ham suffered their first loss of the campaign.
Afterwards, Lingard said: “I got a brilliant reception. I had a good time here but I have to move on with Man United and do my best with Man United.”
On his error against Young Boys in midweek, he said: “Mistakes happen in football, you have to overcome those things.”