For 45 minutes West Ham seemed, by the power of deep collective defence, to be giving Manchester City their toughest test of the Premier League season to date, a goal up and coiled behind a quick-breaking attack.

By the final knockings of the second half on a clammy day in east London the away fans were pogoing about happily, Erling Haaland had finally scored a goal, after almost scoring a goal more times than seemed humanly possible in a single game of football, and City were romping towards their fourth straight win of the season, 3-1 up and on the verge of returning to the top of the table.

In between Pep Guardiola’s team were indebted to a fine, incisive performance from Jérémy Doku on the left, providing the ball-carrying ability lost by the departure of Riyad Mahrez, and an excellent all-round display from Julián Álvarez. West Ham had played well, with Edson Álvarez and Lucas Paquetá holding their own at times in midfield. But somehow there always seemed to be other gears, other angles for the champions. Frankly, City just look at least a couple of levels up on every other team in the league.

The air inside the London Stadium was heavy with end-of-summer heat all afternoon. Before kick-off Paolo Di Canio had come bowling out on to the field waving his arms before unexpectedly breaking into I’m Forever Blowing Bubbles, crooner style. The response was perhaps less feral than he might have hoped, verging more towards mild surprise.

And in the opening moments City began this game like a team intent not just on victory but on wiping every memory of West Ham off the map. At times in the opening exchanges this felt like a team treating its opponent as a piñata. With six minutes gone Alphonse Areola made three close-range saves in the space of 10 seconds, with two other shots at goal also blocked as City took it in turns to machine gun the west Ham goal. City’s data scientists could study that footage frame by frame in the style of the Kennedy assassination film and still not understand how the ball didn’t go into the net.

Julián Álvarez congratulates Jérémy Doku after the Belgian scores his first goal for Manchester City.

Julián Álvarez congratulates Jérémy Doku after the Belgian scores his first goal for Manchester City. Photograph: Kin Cheung/AP

There had been a suggestion Guardiola might pick Phil Foden in the centre of midfield, as a kind of 4D chess move in a covert master-battle with Gareth Southgate. In fact he started Foden in exactly the same position Southgate had against Scotland, to the right of the attack in a 4-2-3-1

With 14 minutes gone Jérémy Doku combined well with Josko Gvardiol. His cross found Haaland completely unmarked (how?) at the back post. He smashed the ball, not just wide, but miles wide with his left foot. A genuinely strange moment in the game.

With Bernardo Silva the other half of the double-pivot in midfield, City had a free agent in possession. Behind this the four centre-backs in defence didn’t work quite so well in the first half. Gvardiol looked uncomfortable at times trying to conduct the possession in attack. And it was down his side that West Ham broke away to score.

It was an excellent move, begun by Jarrod Bowen, cutting out Gvardiol with a lovely reverse pass to Vladimir Coufal. He galloped unimpeded down the right, waited a beat, then lifted the perfect cross for James Ward-Prowse to dive full-length and nod the ball into the corner of the net.

Haaland might have made it 1-1 on 41 minutes after more excellent work from Doku, pirouetting into space on the left and whipping a low cross that the striker met with a weak touch at the far post, the ball eventually kicked away by Edson Álvarez.

It took City 41 seconds of the second half to equalise. It was all a little too easy. Haaland dropped deep and the ball was fed wide from his lay-back out to Doku, who finally had Coufal isolated, with the right angle to cut in towards goal. He made it look laughably easy, waggling his hips in full flight to throw Coufal one way, then in his next stride curling the ball into the far corner, a wonderful finish for his first City goal.

And City were once again all over West Ham like a heavy weather front. Rodri smashed a shot from a free-kick on to the post. Haaland draw a clawing save from Areola with a flying, running scissor volley.

Faced with this pressure West Ham were happy to live without the ball and take their moments on the break. Emerson found himself bursting through he middle only to see his shot deflected wide. From the corner Ederson reminded the world that he is also very good at the stuff that involves his hands, diving to make a fine save from Kurt Zouma’s header.

With 70 minutes gone City had already taken 25 shots to West Ham’s five. And five minutes later they took the lead. It was made by Julián Álvarez, who took the ball from Silva after a scramble in the West Ham box (the entire second half, at times, felt like a scramble in the West Ham box). The Argentinian hooked a pass over the head of two defenders. Silva, running on with mischievous intent, got a toe to it as Areola came rushing out, and the ball bounced inside the far post. It was escorted there by Haaland, who chose not to apply the final touch and “steal” the goal, what English football historians call an Anti-Nugent.

And before the end Haaland had his moment, left in too much space, free to hammer a low left-footed shot into the corner, his ninth effort of an afternoon that ended with the familiar sight of City’s players applauding the away end; and even Guardiola himself, just a little bit stiff after his back op, going across for his own special wave.