Crystal Palace are up to fourth in the Premier League following a dramatic late finish at the London Stadium.
VAR ruled that Jordan Ayew’s 88th minute winner was indeed onside after the goal had initially been flagged by the assistant.
The technology, which has been the source of much scorn and criticism since its introduction, could not be faulted on this occasion having done its job perfectly with the right decision being reached.
West Ham will perhaps feel hard done by given they arguably deserved a point at the very least from a close-fought London derby.
Sebastian Haller had given the Hammers the lead before Patrick van Aarnholt levelled from the penalty spot.
With the game heading for the a draw, Ayew and officials intervened to allow Palace leave east London with all three points.
It took about half an hour for West Ham to create their first opportunity when Yarmolenko broke free on the right hand side before feeding Haller with a low cross into the box, however, the French striker could only fire straight at Palace keeper Vincente Guaita.
Filipe Anderson then missed a guilt-edged chance when he miscued Ryan Fredericks cross while unmarked at the far post.
In fact, Anderson’s mishit shot was so wayward it actually allowed Fredericks to try and find his teammate a second time but the Brazilian could only head into the grateful hands of Guaita.
Palace then had an opportunity of their own when Wilfried Zaha bamboozled with a fantastic bit of skill to drive into the box but Jeffery Schlupp failed to convert the winger’s pass into a goal.
Guaita was called into action once again, denying Haller again from close range, before Palace’s James McArthur stung the palms of West Ham stand-in keeper Roberto, who started in place of the injured Lukasz Fabianski.
Manual Lanzini then had the chance to give the Hammers the lead just before the break but the Argentinian could only lash his effort wide of Guaita’s left hand post.
West Ham missed another great chance early in the second half when Angelo Ogbonna fired over the bar after Palace had failed to clear their lines.
It seemed as though it would only be a matter of time before the home side would find a way through and their persistence was duly rewarded on 53 minutes with Haller finally beat Guaita.
A brilliant West Ham passing move eventually found Fredericks whose ground pass was stabbed home by the club’s big money summer signing.
Palace refused to lay down and soon had a chance to draw level when Declan Rice handled in the West Ham penalty area.
With the Eagles’ regular and reliable penalty taker Luka Milivojevic missing the game through suspension, it was left to van Aarnholt to step up, and the Dutchman made no mistake from 12 yards.
The equaliser took the sting out of West Ham with few opportunities created by either side.
However, Palace fashioned a chance in the 88th minute as Ayew finished from close range after Martin Kelly’s knockdown.
But before Eagles players and fans could celebrate, the assistant referee’s flag ruled the goal out for offside.
The goal was referred to VAR and after a long look by the men and Stokley Park, the goal was given.
Roy Hodgson’s side claimed an unlikely victory and having started the season as potential relegation candidates, now find themselves sitting in the Champions League qualification places for 24 hours at least.