West Ham eased the pressure on manager Slaven Bilic by fighting back from two goals down to beat Tottenham 3-2 in the Carabao Cup fourth round.
The Hammers looked down and out after Moussa Sissoko and Dele Alli had put Spurs two in front at half-time but Andre Ayew's double pulled them level before Angelo Ogbonna completed a remarkable turnaround.
Bilic admitted this was another do-or-die week for West Ham and he will hope this win at Wembley can spark a recovery ahead of Saturday's crunch Premier League game at Crystal Palace.
The Croatian's celebrations were muted both after his team's goals and at the full-time whistle, suggesting he knows his future will depend on his team improving their position in the top-flight.
But a comeback like this, against a London rival, will surely do wonders for the confidence of his players, who collectively rushed over to toast victory with their jubilant supporters at the end.
For Tottenham, this was a thoroughly disappointing night and another opportunity missed to go far in a competition they had a realistic chance of winning. Mauricio Pochettino has made great strides at Spurs but they are still yet to win a trophy under his leadership.
Pochettino made seven changes, resting the likes of Hugo Lloris, Harry Kane and Christian Eriksen while Bilic made nine himself, with an eye on the weekend's visit to Selhurst Park.
Within seconds Cheikhou Kouyate had lumped a long ball forward for Andy Carroll to fish out of the air but Fernando Llorente showed more subtlety at the other end as his brilliant flick around the corner led to an opening goal.
Son Heung-min was set free down the left and with West Ham caught up field, Sissoko ghosted through the middle and tucked his team-mate's pass into the corner. His opponents' defence was nowhere to be seen.
Alli could have doubled Tottenham's advantage when his header was well-saved by Adrian but the midfielder did find the net shortly before half-time, starting the move with a series of step-overs on the left and ending it with a curled shot inside the far post.
That it took a heavy deflection off Irishman Declan Rice only added to West Ham's sense of deflation and it was little surprise when some of the away support booed at the half-time whistle.
Completely unpredictable, however, was that within 15 minutes of the second half, the visitors found themselves level.
Perhaps Tottenham thought their work was done because twice they failed to clear their lines as Ayew tapped home after Michel Vorm parried Edimilson Fernandes' shot and then Ayew was there again, steering in after Manuel Lanzini poked the ball across the box.
Now the corner of claret and blue fans were filled with hope of an unlikely victory and 10 minutes later, their comeback was complete when Toby Alderweireld failed to track Ogbonna's run at a corner and the defender rose high to head in at the near post.
Pochettino went for a triple dose of creativity by throwing on Mousa Dembele, Eriksen and Georges-Kevin Nkoudou in the latter stages but his side's momentum was lost and West Ham held on for a thrilling win.