A superb injury-time equaliser from Declan Rice and a goal in the final seconds of extra-time from Jarrod Bowen saved West Ham from the ultimate FA Cup embarrassment against Kidderminster Harriers.
For all the talk of a new West Ham, this was a reminder of a bit of the old. Desperate and chaotic for large parts before Rice and Bowen embodied the new under David Moyes, taking matters into their own hands to break Kidderminster hearts.
The Harriers, third in the National League North, defended superbly, threatened on the break and had their hearts broken not once but twice.
A capacity crowd filled the stands at Aggborough and supporters were bouncing on the home terrace more than an hour before kick-off.
Former Led Zeppelin frontman Robert Plant is a regular here and watched on in delight as West Ham’s defence suffered a communication breakdown and allowed their hosts a moment of utter magic.
Having carelessly tripped Amari Morgan-Smith on the left, Issa Diop – having a shocker - clattered into Alphonse Areola and the ball fell for Alex Penny to fire the home side ahead.
Aggborough erupted as Penny wheeled away. Manager Russ Penn, spun in delight with his coaching staff on the pitch as the substitutes warming up raced to celebrate in front of the bouncing terrace behind the home goal, where red smoke was filling the air.
West Ham looked shell-shocked, unable to complete more than a couple passes let alone grasp any sort of control.
Moyes was looking increasingly incensed hooked Diop and Alex Kral at the break, sending for Rice and Craig Dawson.
The hosts still created the better chances before West Ham finally managed a first shot on target, Bowen drawing a save at the near post after an hour, before Said Benrahma saw one turned behind a moment later.
Tomas Soucek and Aaron Cresswell were then sent on to further shake the Hammers from their malaise and into life. Pablo Fornals would follow soon after but they were making little difference.
The most galling thing for Moyes will have been that his side were hardly making things too difficult for their hosts. Those in red were superbly organised by Penn, who had only this week had the time to study footage of the Hammers due to a chaotic schedule, and were not often being stretched by their Premier League opponents. There was very little last-ditch defending needing to be done.
In the end, Rice went alone during three minutes of stoppage time. The England international collected the ball in his own half, drove forward and laid the ball off to Fornals before charging into space beyond his marker.
Fornals played the return, Rice checked inside and blasted into the roof of the net.
It was hard to say that West Ham deserved another 30 minutes to turn their embarrassing afternoon around, but the calibre of goal certainly merited the chance.
West Ham’s superior fitness was starting to show during extra time, but still the Harriers frustrated Moyes’s side - each decision falling their way cheered like another goal.
Those cheers grew louder when Bowen poked an effort in at the far post only to see the linesman’s flag raised on the far side.
Bowen had the last laugh, however, in the right place at the right time to turn home Cresswell’s cross after Andriy Yarmolenko had seen a shot turned away.
While Moyes may have to take days to unscramble that performance in his mind, the bare fact is that West Ham are through and still fighting on three fronts this season.