Iran’s players stormed the pitch at full-time as if they had won the World Cup rather than just their opening match in Russia after an own goal from Morocco’s Aziz Bouhaddouz gifted them a dramatic 1-0 victory on Friday.

Wasteful finishing looked to have consigned this compelling contest at the Saint Petersburg Stadium to a goalless draw but Bouhaddouz’s mistake in injury-time means Iran emerge as the early challengers to Spain and Portugal in group B.

Iran coach Carlos Queiroz, once of Real Madrid and Manchester United, insisted the chaos that has engulfed Spain this week offered no boost to these teams’ chances, but this victory certainly cranks the pressure up a notch.

“Superman is only in the cartoons,” Queiroz said. “Nobody is superman. What can happen once in a while is when a group of people are united, can create super stories and super things.”

When Bouhaddouz nodded in at the near post, Iran’s substitutes could not resist rushing onto the field and when the final whistle blew moments later they were sprinting over again in delight.

Morocco should at least take heart from a blistering first half an hour, during which their zip and zest made them virtually unplayable. But Hakim Ziyach, Ayoub El Kaabi and Mehdi Benatia all failed to capitalise.

“I am very disappointed,” their coach, Herve Renard, said. “I think if I would have come to this press conference with a draw I would also have been disappointed given how the game played out.”

But Iran showed the same grit that had frustrated Argentina for 91 minutes four years ago and while Lionel Messi was the difference that day, this time it was their turn to snatch a last-gasp winner.

Their build-up had not been smooth. Nike had blocked the players’ supply of boots and friendlies against Greece and Kosovo were cancelled.

It gave Queiroz good reason for positioning his team as outsiders but they now head into the match against Spain on Wednesday both with a winning feeling and hope.

“If the game against Morocco was the World Cup final for us, the game against Spain will be the Universe Cup final,” Queiroz said.

Morocco’s fans, at a World Cup for the first time in 20 years, belted out their own national anthem and then applauded Iran’s, the 67,000-seater arena buzzing with the hum of vuvuzelas in a throwback to the 2010 World Cup in South Africa.

The only shame was the large number of empty seats, with many supporters still queueing to get through security 15 minutes before kick-off.

Morocco started brilliantly, hounding Iran and swarming forward with such ferocity that on the line, Queiroz spent most of the opening 20 minutes urging his players to pause and take a breath.

The onslaught finally eased after half an hour and by the interval Iran had not only survived but finished the stronger, Sardar Azmoun, the “Iranian Messi”, spurning a one-on-one after a scintillating break.

Perhaps tired from the first period or, more likely, reminded of their defensive duties during the interval, both teams were more cagey after the restart.

Queiroz and Renard were involved in a touchline scuffle, quickly resolved, before the real drama arrived in the 95th minute.

Bouhaddouz could not see what was behind him when a whipped free-kick came in from the left and he panicked, diving to the ball, and heading it agonisingly inside his own near post.

The group match B in Saint Petersburg had been heading for a goalless draw until Bouhaddouz’s unfortunate intervention as he tried to clear Ehsan Haji Safi’s cross but only directed it past his own goalkeeper.