Mark Noble came off the bench only to miss a stoppage-time penalty as Manchester United snatched a dramatic 2-1 victory at the London Stadium.
Club captain Noble, West Ham’s Mr Reliable from the spot, was sent on by manager David Moyes to take the penalty after Luke Shaw handled in the area.
The long-serving midfielder, who retires at the end of the season, had not missed a spot-kick since December 2016, but he was denied a sentimental winner by United goalkeeper David De Gea.
It was a hugely dramatic end to a thrilling match which saw Jesse Lingard return to haunt the club for whom he starred on loan last season.
In a bitter blow for West Ham and Moyes, who tried to re-sign Lingard over the summer, the England forward curled in what turned out to be the winner two minutes from time.
Cristiano Ronaldo had earlier scored his fourth goal in three matches since returning to United, cancelling out Said Benrahma’s deflected opener for the hosts.
Defeat was tough on West Ham, who showed no signs of fatigue from their Thursday night exertions in Europe as they went at United from the off.
Benrahma robbed Harry Maguire in the area and pulled the ball back for Jarrod Bowen 10 yards out, but his shot lacked power and was blocked by Aaron Wan-Bissaka.
Moments later a glorious cross-field move from the Hammers culminated in another chance for Bowen, whose deflected shot was kept out by the boot of De Gea, with Tomas Soucek firing the rebound over.
Ronaldo’s first glimpse of goal came midway through the first half, with a couple of stepovers gaining him a yard on Vladimir Coufal before shooting straight at Lukasz Fabianski.
United seemed to have weathered the early storm and almost took the lead through Bruno Fernandes, Fabianski getting the smallest of touches to tip his effort on to a post.
But moments later West Ham went ahead when Benrahma’s shot from the edge of the area took a huge deflection off Raphael Varane to wrongfoot De Gea and roll into the net.
The lead lasted only four minutes before Ronaldo struck, guiding a Fernandes cross into the chest of Fabianski and reacting quickest to tuck in the rebound.
Fabianski got down well to deny Ronaldo a second before Nikola Vlasic skied a chance for the Hammers as a breathless first half came to an end.
West Ham had a major let-off at the start of the second when a wayward pass from Pablo Fornals allowed Fernandes to slip Ronaldo in, but he was denied by Fabianski.
Ronaldo felt he should have had a penalty when he went down under Coufal’s challenge in the area, but referee Martin Atkinson thought otherwise.
The Portugal star was also denied by a timely block from the impressive Kurt Zouma as he looked to get on the end of another Fernandes cross.
Lingard came on as a 73rd-minute substitute and 15 minutes later found the top corner with a fine curler.
When Shaw handled Andriy Yarmolenko’s cross to concede a VAR-awarded penalty the script was written for Noble, but De Gea tore it up with a diving save to secure the points.
No Data Analysis info