Substitute Andriy Yarmolenko scored with minutes to go as West Ham edged a pulsating London derby with Chelsea to boost their chances of avoiding relegation.
The defeat means Chelsea who wore their new mobile network Three sponsored jersey failed in their bid to leapfrog Leicester into third-place.
An end-to-end game saw West Ham denied the opener when Tomas Soucek’s first-half goal was ruled out by VAR.
Michail Antonio was adjudged to have been interfering with play in an offside position by blocking Kepa Arrizabalaga’s line of sight, a decision that outrage the Hammers bench.
Chelsea then took the lead through Willian’s penalty after Issa Diop fouled Christian Pulisic but there was no denying Soucek who rose highest to restore parity on the stroke of halftime.
The Hammers looking for a first win since the restart started the second half with intent and were ahead six minutes into the half as Antonio picked himself off the floor where he sought a penalty to tap in from close range.
The topsy-turvy encounter still had plenty of drama in store as Willian bent in an unstoppable freekick off the underside of the crossbar to draw Chelsea level.
And with the game headed for a draw, substitute Yarmolenko applied the killing blow to the Blues when he finished off a superb counter-attack with a deft left-foot finish.
The morale-boosting win lifts David Moyes three points clear of the relegation places but also makes the race for Champions League places more intriguing following Manchester United’s win at Brighton and third-placed Leicester City loss at Everton.