Three down at the break. Level by the 82nd minute. And we nearly won it. Scott Parker’s first night as our head coach was a rollercoaster nobody saw coming.

The first half

It started brightly enough. Taty Castellanos forced an early save from Nathan Trott after Jarrod Bowen’s effort deflected his way.

Then it all went wrong.

On 11 minutes, Alex Robertson found Jack Moylan, and he advanced to fire a swerving 20-yard strike into the top corner past Mads Hermansen.

Hermansen tipped away a Calum Scanlon cross and Will Fish headed over as Cardiff kept coming.

On 36 minutes, Perry Ng curled a ball over a static back line and Moylan slowed down cleverly to draw a clumsy foul from Morato. Moylan sent Hermansen the wrong way from the spot on 37.

Two minutes later it was three. Joel Bagan’s corner, Fish at the near post, and Moylan was there again to make it 3-0 and complete his first hat-trick in English football.

The 3,000-plus in the away end had already been singing “You’re not fit to wear the shirt”, and the third goal was met with furious boos. Max Kilman and Soungoutou Magassa were both booked during the half.

It was as poor a 45 minutes as we’ve seen this season.

Parker’s changes

Parker acted at the break. Mohamadou Kanté, Joël Piroe and Ezra Mayers came on for Magassa, Castellanos and Morato.

The difference was instant.

On 58 minutes, Bowen floated a lovely pass through, and Divine Mukasa chipped Trott, with the ball going in off the post.

Seven minutes later, Piroe flicked on Bowen’s pass and Arne Engels slid home his first goal for the club. Game on.

Edvin Austbø came on for Solomon on 69 minutes, and the pressure kept building. Kanté nearly toe-poked one past Trott.

Then, on 82 minutes, Bowen whipped in a brilliant cross and Kilman volleyed in from close range. 3-3. Unbelievable.

Almost a winner

Veltman was booked on 84 and made way for Tomáš Souček on 88.

There was still time for Austbø to force a save from Trott, Mayers to drag one wide from a Bowen cross, and Souček to see a header saved deep into stoppage time.

On the night, we had 18 shots to Cardiff’s seven, 10 on target to their four, and 56% of the ball, per BBC Sport.

Player of the match: Jarrod Bowen

Two assists, the pass Piroe flicked on for the second, and the captain who dragged us back into it. Take a bow, skip.

The line-ups

West Ham: Hermansen; Veltman (Souček 88), Mavropanos, Kilman, Morato (Mayers 46); Bowen (c), Engels, Magassa (Kanté 46), Solomon (Austbø 69); Mukasa; Castellanos (Piroe 46).
Subs not used: Areola, Golambeckis, Orford, Scarles.

Cardiff: Trott; Ng (Kpakio 72), Fish, Bagan, Scanlon (Turnbull 72); Robertson; Tanner, Moylan, R. Colwill (c) (J. Colwill 55), Willock (Ashford 56); Salech.

Referee: Edward Duckworth.

Team news recap

Konstantinos Mavropanos was back in the starting XI after his knee injury, which is a real boost. Joel Veltman deputised at right-back with Kyle Walker-Peters out after going off against West Brom.

Where it leaves us

We stay 8th on 23 points (W6 D5 L3) after 14 games, with 36 goals scored, still the most in the division. Middlesbrough lost at Wrexham, so the gap to the top is now five points, per BBC Sport.

Cardiff stay 18th and remain unbeaten at home.

Next up is Blackburn away on Saturday (3pm).

Plenty for Parker to fix at the back. But that second half showed what this squad can do.