LONDON — At 4-0 down after just 36 minutes, there was a danger that Julen Lopetegui was going to be the only person connected to West Ham left in the stands.

The Hammers boss, serving a one-match touchline ban after picking up three yellow cards this season, watched on from a high vantage point as fans streamed out of London Stadium all around him before half-time, shaking their heads in disbelief at the havoc Arsenal wreaked below. And yet, four minutes later, out of nowhere, West Ham had scored twice. Hope was revived.

Just when the Hammers were getting themselves in a position from which to mount a second-half comeback, goalkeeper Lukasz Fabianski punched Gabriel Magalhães to concede a penalty that Bukayo Saka converted to send the Gunners in 5-2 up at the break.

It was, quite simply, absolute madness — a glorious advert for the brilliantly chaotic, implausibly unpredictable Premier League product, which ranks as one of the United Kingdom’s most successful global exports in any field. In the end, the seven first-half goals tied a league record with three other games, the last of which came between Reading and Manchester United in December 2012.

Judging by the relative lack of empty seats — most of those beleaguered West Ham fans returned anyway — it was amusing that just when it seemed like more of the same would follow after the break, the second was goalless and uncompetitive. It felt like the proverbial early night in bed after the happy-hour hedonism. So, with about 15 minutes left, they started to leave again. It is, as ever, the hope that kills you as a sports fan and West Ham’s had long been extinguished.

Meaningful conclusions from games like this are ill-advised, but it should nevertheless be noted that after Arsenal needed a set-piece to break the deadlock, some of their football was a combination of divine and deadly.

Gabriel Magalhães’ 10th-minute header was the final act of a set-piece routine that will earn Arsenal fresh praise even given their well-documented strength in those situations. Running from far post to near, the Gunners were a blur of movement, in which perhaps the most cunning act was Jurriën Timber‘s gentle nudge on Lucas Paquetá to ensure Saka’s delivery found Gabriel unmarked.

If dark arts helped break the deadlock, Arsenal then well and truly stepped into the light.

Crysencio Summerville had a 17th-minute effort correctly ruled out for offside but West Ham were then overrun, Martin Ødegaard and Saka combining superbly to lay on a simple finish for Leandro Trossard. Saka then jinked into the box, and Paqueta could do nothing other than bring him down. Ødegaard converted. Trossard then released Kai Havertz who finished low past Fabianski to cue the first mini-exodus.

West Ham were the heavyweight knowing they were losing on points and therefore reduced to hopeful haymakers; inexplicably, they started landing. Carlos Soler was given too much space in the Arsenal defensive third, though his pass was superbly executed through for Aaron Wan-Bissaka to slot home. Wan-Bissaka had scored twice in 182 Premier League appearances, but now has two in six days. Because why not?

Perhaps even more improbably, Declan Rice conceded a dubious free kick awarded for a challenge on Paqueta, and Emerson Palmieri curled a stunning 25-yard free kick in off the crossbar. It was the left-back’s second goal in 20 months.

Just as the visitors’ sudden loss of composure sparked memories of Arsenal’s 4-4 draw at Newcastle in February 2011 — the only time a Premier League team has failed to win a game in which they led by four first-half goals — Fabianski mistakenly floored Gabriel trying to meet a corner and Saka slotted home the penalty to conclude the scoring. Mercifully for them, the three-goal cushion proved sufficient.

Arteta took pleasure in the restoration of the flow in Arsenal’s game, triggered most significantly by Ødegaard’s return to the starting lineup; it is no coincidence the Norway playmaker’s reintegration has come in a week when the Gunners scored 13 goals including five in the Champions League for the first time since 2008.

There was one note of caution after that game, which proved prophetic here too. “Before and after half-time you need to get through those 10-15 minutes in a different way,” Arteta said after Tuesday’s 5-1 win in Lisbon. “We gave so many balls away, and that doesn’t allow you results.”

There was a similar sloppy spell here and there might come a time when that becomes the talking point. But not today, not after a 45-minute spell that ranks among the most tumultuous in recent memory.