Javier Hernandez scored twice as West Ham came back from the brink of a humiliating defeat to beat Huddersfield 4-3.
Town, rock-bottom of the Premier League and all but doomed to relegation, were heading towards only their fourth win of the season when they led 3-1 through Juninho Bacuna and a double from Karlon Grant.
But Hernandez climbed off the bench to score twice and shove Huddersfield another step closer to the Championship.
The visitors had only scored eight away goals all season before they showed up at the London Stadium.
By half-time that tally had reached double figures and just after an hour they made it 11 with mid-table West Ham looking every bit a set of players who have already clocked off for the summer, in the middle of March.
But the Hammers, who led through Mark Noble’s early penalty, eventually woke up and Angelo Ogbonna pulled one back.
Hernandez then took over to earn them a third successive home Premier League win for the first time since they moved to the former Olympic Stadium
West Ham had been gifted the lead after a quarter of an hour when 18-year-old Aaron Rowe, making his full debut, tripped Manuel Lanzini in the area and Noble did the honours.
Yet two minutes later Huddersfield, who had not scored a single goal away from home since Boxing Day, were level.
Michail Antonio lost Bacuna at Aaron Mooy’s corner, leaving the Dutchman with a free header to open his account for the club.
Worse was to follow for the hosts when Alex Pritchard played a short free-kick out wide to Chris Lowe.
The German full-back drove the ball low into a crowded area and Grant was on hand to steer it home from six yards out.
The hosts trooped off at half-time with boos ringing in their ears and boss Manuel Pellegrini sent on Hernandez, for Antonio.
Marko Arnautovic, summoned from the naughty step for a first start since January when he declared he wanted to move to China, should have equalised after a jinking run from Felipe Anderson but shot too close to Lossl.
And moments later Huddersfield had their third, Grant bullying Issa Diop off the ball and cutting inside Ogbonna’s feeble challenge before curling into the top corner.
Arnautovic was substituted to the sound of more boos, illustrating that all is not yet forgiven for the former crowd favourite.
Yet maybe the departure of the moody Austrian galvanised West Ham as, with 15 minutes remaining, they halved the deficit, Ogbonna scoring with a powerful downward header from Aaron Cresswell’s corner.
In the 84th minute the hosts hauled themselves level, substitute Samir Nasri sending over an inviting diagonal cross which Hernandez buried at the far post with a diving header.
Even then Huddersfield could have won it, only for Phillip Billing to hook a glorious chance over from eight yards out.
So there was an air of inevitability when, in stoppage time, Anderson lofted the ball into the area and Hernandez guided it home to cap a barmy match and secure a scarcely deserved win for West Ham.
Stay updated with the latest news, gossip and football stories by following us @Football_P