With the seconds ticking away, it fell to Adama Traoré to provide a crucial moment of incisiveness. The Wolves winger has rarely been noted for his composure in the final third and it was difficult to shake off the suspicion he would fluff his lines when he ran through in the third of four added minutes.

Yet he kept his focus and fired a low shot past Lukasz Fabianski, sparking delirious scenes in the away end and a mass exodus in the home sections. Wolves had their first victory in the Premier League and, by leaving it so late, Nuno Espírito Santo’s jubilant side deepened Manuel Pellegrini’s growing unease.

This is the first time West Ham have lost their opening four fixtures since 2010-11 and it will not have escaped their attention that they finished that campaign in 20th place, relegated with a game to spare and wondering what on earth possessed them to hire Avram Grant as their manager.

Pellegrini, of course, has a much better track record than Grant and it remains difficult to envisage the Chilean leading West Ham into a survival scrap. Yet the Chilean’s new side already find themselves in an awkward position: bottom of the league despite spending £100m on nine players in the summer. They walked off to boos after yet another demoralising afternoon at the London Stadium. “We need to reduce the amount of mistakes,” Pellegrini said.

The problem for West Ham is they might have to wait a while before they get off the mark. They will have visited Everton and hosted Chelsea and Manchester United by the end of September and Pellegrini will be confronted by a major crisis if he cannot inspire an improvement soon.

Pellegrini did not attempt to defend this uneven performance. West Ham had secured their first competitive win under him earlier in the week, fighting back from a goal down to beat AFC Wimbledon in the Carabao Cup, but they failed to muster any intensity in the first half and Wolves had already spurned a couple of glorious opportunities before Traoré scored his first goal since his £18m move from Middlesbrough last month.

The home fans had roared during the early stages, sensing Wolves were vulnerable when Felipe Anderson forced Rui Patrício to make a fine save in the fourth minute. Yet it was a flawed start from both sides and Anderson’s influence quickly waned. The visitors refused to be cowed after that early flurry and they were dangerous on the right, taking advantage of Michail Antonio’s failure to protect Aaron Cresswell.

Buoyed by holding Manchester City at Molineux last weekend, Wolves looked slick in their 3-4-2-1 system and it was not long before they heard the first rumblings of dissent from the stands. The groans were audible as West Ham conceded possession with alarming regularity.

Pellegrini paid Wolves a compliment by replacing Robert Snodgrass with Andriy Yarmolenko during the interval. The change led to a brief period of improvement, Patrício clawing Antonio’s looping header away after a cross from the Ukrainian.

Yet while Yarmolenko saw a goalbound volley blocked by the excellent Conor Coady with 20 minutes remaining, it would be pushing it to say that West Ham dominated the second half. Wolves had their moments because they kept attacking. “It is special for the boys because we didn’t change since day one last season,” Espírito Santo said. “I don’t know any other way to play football. When it is in your character to want to achieve things, you have to believe.”

When Raúl Jiménez tore down the left, Leo Bonatini looked certain to score. Fabianski sped from his line to deny the substitute, however, and West Ham would breathe another sigh of relief when Jiménez tripped over his own feet after being released by Rúben Neves.

Wolves survived a scare when Patrício denied Arnautovic and they pounced when West Ham took a quick free-kick near their own box, with Carlos Sánchez guilty of dawdling on the ball. Neves and Bonatini combined to release Traoré and his shot was too powerful for Fabianski.

“We need to defend better and score more goals,” Pellegrini said. It sounds so simple.