Leeds United are through to their first FA Cup semi-final since 1987 but Storm Dave could not have made heavier weather of it.
After 90 minutes, Leeds place at Wembley was all but booked. The huge numbers of empty seats around the London Stadium showed how many Hammers fans had given up hope and headed for the exits.
With Dominic Calvert-Lewin rediscovering his form from 12 yards, it looked like fringe players Ao Tanaka and Willy Gnonto had put Leeds into their first FA Cup semi-final since 1987 only for West Ham, who had hit a post at 1-0, to score twice in three minutes of stoppage time.
West Ham had two goals rightly disallowed for offside, and the second after hitting the woodwork for the third time in the game.
Yet somehow, Leeds scraped through 4-2 on penalties for the second time in three FA Cup ties, with Lucas Perri saving twice.
For a long time it had looked like the Whites' miserable record in London and their inability to kill games off had come back to spectacularly bite them but in the end Leeds manager Daniel Farke got the luck he asked for before the game.
Leeds started hungrily, Noah Okafor forcing a corner from a second-minute shot. When Axel Disasi played Alphonse Areola into trouble after four minutes, it was Okafor sliding in on the goalkeeper, who was on his goalline.
At the other end, former Hull City forward Jarrod Bowen was, as so often, West Ham's main threat.
HELPING HAND: Kyle Walker-Peters and Lukas Nmecha of Leeds United (Image: Steve Bardens/Getty Images)placeholder image
HELPING HAND: Kyle Walker-Peters and Lukas Nmecha of Leeds United (Image: Steve Bardens/Getty Images)
But when he put a ball in for Taty Castellanos, and again when he took the shot himself, Lucas Perri made good low saves.
West Ham are not a team who press as much in the face of their opponents as many Premier League teams, and it allowed Ao Tanaka to show his qualities on the ball and grow in confidence.
It was the Japan international, part of the first Asian team to beat England in the last international break, who gave his side the lead.
Before the game Leeds players laid a wreath in front of the appreciative away fans to mark Monday's 26th anniversary of the deaths of supporters Christopher Loftus and Kevin Speight whilst following their team in Istanbul, and Tanaka broke the deadlock in the 26th minute.
NO PENALTY: Anton Stach is caught by Max Kilman (Image: Steve Bardens/Getty Images)placeholder image
NO PENALTY: Anton Stach is caught by Max Kilman (Image: Steve Bardens/Getty Images)
He started the move in his own half, and it was he Okafor picked out in the area. Tanaka made space for a shot, and although he hit it against Disasi, it his the crossbar and bounced down behind the goalline.
Leeds grew in confidence from there and had penalty appeals turned away by Sheffield referee Craig Pawson and his video assistant referee Peter Bankes.
Freddie Potts fired a dangerous ball across the area which no one anticipated. Leeds broke through Okafor, who found Anton Stach.
The German got a shot away before Max Kilman clattered him in a tackle which ended Stach's afternoon, but a corner was all that resulted.
QUIET SATFISFACTION: Ao Tanaka celebrates scoring with Pascal Struijk (Image: Steve Bardens/Getty Images)placeholder image
QUIET SATFISFACTION: Ao Tanaka celebrates scoring with Pascal Struijk (Image: Steve Bardens/Getty Images)
When Lukas Nmecha was rightly booked for a late tackle on Disasi minutes later, the "injustice" will not have been lost on Daniel Farke, who complained pre-match about the officiating Leeds have been treated to in this season's Premier League. He would get his penalty in the end.
West Ham made a double substitution at the start of the second half and at the 2012 Olympic stadium, Leeds just could not get out of the blocks.
Joe Rodon went off injured seven minutes into the second half clearly struggling after what looked like a bang to the head.
By then Ethan Ampadu had taken a booking for a cynical foul as Traore broke into Leeds' half, and Castellanos put a Bowen pull-back wide.
When the striker headed against the post in the 62nd minute, Farke got three substitutes ready.
Gnonto drew a free-kick quickly after coming on.
BODY BLOW: Axel Disasi celebrates West Ham United's stoppage-time equlaiser against Leeds United (Image: Mike Hewitt/Getty Images)placeholder image
BODY BLOW: Axel Disasi celebrates West Ham United's stoppage-time equlaiser against Leeds United (Image: Mike Hewitt/Getty Images)
That was half-volleyed over by Struijk but a minute later Gnonto played in fellow substitute Brenden Aaronson, who was tackled in the area by Kilman.
Again Pawson waved play on but this time Bankes summoned him to the pitchside monitor to think again.
Calvert-Lewin, who missed a penalty at Crystal Palace two Leeds games, before sent Areola the wrong way and home supporters headed for the exits.
Once more, a Leeds game brought a mood swing in the game, Gnonto cheekily back-flicking a Jayden Bogle shot just wide and Sebastiaan Bornauw's long-range shot fumbled over the bar by Areola.
Three minutes later a Traore cross was put in by a combination of Struijk's head and Disasi's boot to send those West Ham fans who had kept the faith – plenty had not – into ecstasy.
It looked like West Ham had won it two minutes into extra time when Perri ran out to a long ball and wrongly thinking he was outside of his area, headed the ball up and to Matheus Fernandes who scored from a tight ankle.
Bankes came to Leeds' rescue, giving offside from Stockley Park.
A minute later Tomas Souchek blocked a James Justin effort on the line - perhaps with some hand involved - and Gnonto blazed the rebound over.
But from there it was all West Ham,
Perri saving low from Kyle Walker-Peters, and with his head from Castellanos. When Bowen struck a post again in the 102nd minute, Pablo put the rebound in, but from miles offside.
In jumping for a woefully over-hit Aaronson cross at the end of extra-time, Areola injured himself and made way for 20-year-old debutant Finlay Herrick.
West Ham United: Areola (Herrick 120); Walker-Peters, Kilman, Disasi, Diouf (Scarles ET HT); Potts (Soucek HT), Magassa (Pablo HT), Fernandes; Bowen, Castellanos (Kante ET HT), Traore (Mayers 120+5). Unused substitutes: Lamadrid, Golambeckis, Ajala.
Leeds United: Perri; Rodon (Bornauw 52), Bijol, Struijk; Bogle (Piroe ET HT), Ampadu, Tanaka (Gruev 69), Justin; Stach (Aaronson 38), Okafor (Gnonto 69); Nmecha (Calvert-Lewin 69). Unused substitutes: Longstaff, Byram, Darlow.
Referee: C Pawson (Sheffield).