Manchester United beat West Ham 2-1 thanks to a last minute penalty save from David De Gea.
United, whose away unbeaten run in the league now stretches to 30 games, fell behind through a deflected Said Benrahma effort before Cristiano Ronaldo scored the equaliser before the break.
Jesse Lingard, who was excellent on loan at West Ham last season, atoned for his costly Champions League error by coming off the bench to score a stunning winner in the 89th minute.
The drama didn't stop there though, as after United thought they should have had a penalty at one end when Kurt Zouma brought down Ronaldo, the Hammers were awarded one at the other after Andriy Yarmolenko's cross struck Luke Shaw's arm.
Somewhat controversially, David Moyes chose to make a substitute just before the penalty was to be taken, bringing on club-captain Mark Noble specifically to take the spot-kick.
Noble's first touch of the ball was the penalty, and his effort was saved by De Gea, who guessed correctly in diving to his left.
The result means Ole Gunner Solskjaer's side remain unbeaten and are now level with Liverpool at the top of the table, while West Ham are in eighth after suffering their first loss of the campaign.
According to Infogol's expected goals (xG) model, a United win was a fair reflection of the chances created in the match, with the xG total finishing: WHU 1.67 - 2.16 MUN.
United limited their hosts to just 0.87 non-penalty xG, showing a decent defensive display, while Cristiano Ronaldo was on the end of everything good United did in attack, with the Portuguese star taking 76% of United's xG total (1.65).