Iranian women were allowed to watch their national team inside a football stadium for the first time since the 1979 Islamic Revolution as Iran took on Spain at the 2018 World Cup.

Women with flags and face paint streamed into Tehran’s Azadi stadium on Wednesday despite fears police would stop them and initial worries the idea had been cancelled.

There is no law banning women from sports stadiums in the country, but in practice the religious establishment has long forbidden them from entry.

Iranian women celebrate after being allowed into stadium for first time in 37 years to watch World Cup match

However, after calls from some moderate politicians for both women and men to be able to watch Iran’s 2018 World Cup games.

The decision was not made in time for last week’s match, which Iran won against Morocco 1-0, but after it was announced on Wednesday morning, women and families queued outside Azadi stadium – only to be confronted by security officials who said due to “infrastructure issues” the planned viewing had been cancelled.

Hundreds of the waiting families staged a sit-in and began chanting, saying they would not leave until they were allowed in. A last-minute intervention from interior minister Abdolreza Rahmani Fazli finally meant the gates opened about an hour before kick-off.

Iran vs Spain: World Cup player ratings Show all 22 1 /22 Iran vs Spain: World Cup player ratings Iran vs Spain: World Cup player ratings Alireza Beiranvand 7 Had lots to do in the first half, made some good saves and kept up the levels of concentration AFP/Getty Images Iran vs Spain: World Cup player ratings Ramin Rezaian 6 Was solid defending the wings, and not afraid to come forward,his runs allowed Iran one or two half chances AFP/Getty Images Iran vs Spain: World Cup player ratings Majid Hosseini 6 Led the defence really well, he kept the line strong and made it hard for Spain to penetrate, not easy with so many bodies to organise EPA Iran vs Spain: World Cup player ratings Morteza Pouraliganji 7 Made a great block from one of Silva’s shots, to keep the score level in the first half REUTERS Iran vs Spain: World Cup player ratings Ehsan Haji 5 Did well in the first half but had men around to it hard for Spain to penetrate, less effective in the second half AFP/Getty Images Iran vs Spain: World Cup player ratings Karim Ansari 6 Pulled his shot in the second half that could have put Iran in front, but instead they fell behind with the next play AFP/Getty Images Iran vs Spain: World Cup player ratings Omid Ebrahimi 4 Very quiet in defence and attack, his main contributions coming by passing the ball forward, and getting a yellow card, made one chance towards the end EPA Iran vs Spain: World Cup player ratings Vahid Amiri 6 Tracked back well, but showed prowess when in attack and made a late challenge to get a yellow card AFP/Getty Images Iran vs Spain: World Cup player ratings Mehdi Taremi 6 Had a chance to equalise but his header was not strong enough and he sent it wide AP Iran vs Spain: World Cup player ratings Saeid Ezatolahi 6 Got forward well after Iran went behind, he got the ball in the net but it was disallowed as VAR found him offside EPA Iran vs Spain: World Cup player ratings Sardar Azmoun 5 Did more defending than attacking but chased every clearance with gusto, unable to make an impact when Iran started moving forward after they conceded AFP/Getty Images Iran vs Spain: World Cup player ratings Diego Costa 7 Couldn’t find any space in between Iran’s many defenders in the first half but came out strongly in the second and got the goal AFP/Getty Images Iran vs Spain: World Cup player ratings Isco 6 Single handedly tried to run the ball through Iran and he manoeuvred well and ran in from the left creating gaps in the defence AP Iran vs Spain: World Cup player ratings Lucas Vazquez 6 Performed admirably trying to get around the back of the Iranian defence but didn’t manage to finish EPA Iran vs Spain: World Cup player ratings David Silva 7 Passed the ball accurately around Iran’s area, linked well with Iniesta and Isco and created space to have more than one shot blocked AFP/Getty Images Iran vs Spain: World Cup player ratings Andres Iniesta 6 Created some spaces with accurate passes and linked with David Silva well, but the end ball wasn’t quite there Getty Images Iran vs Spain: World Cup player ratings Sergio Busquets 6 Had a great strike saved early in the second half, but kept attacking well AFP/Getty Images Iran vs Spain: World Cup player ratings Jordi Alba 5 Made sure Spain stayed on the attack, returning all the clearances back to Silva, Isco and Iniesta Getty Images Iran vs Spain: World Cup player ratings Sergio Ramos 5 Delivered decent balls on the set plays but found it hard to penetrate an 11-man defence REUTERS Iran vs Spain: World Cup player ratings Gerard Pique 6 Nothing to do at the back as Iran hardly attacked but when the attack came he was switched on and got the ball forward quickly REUTERS Iran vs Spain: World Cup player ratings Dani Carvalhal 6 Got involved in the attacking play and penetrated well enough, didn’t get too many shots off AFP/Getty Images Iran vs Spain: World Cup player ratings David De Gea 5 Had nothing to do, no shots came his way in the first half but cleared any set pieces in his area Getty Images

The game, broadcast from Kazan, was Iran’s second match. While they narrowly lost to Spain 1-0, the mood in the stadium was still jubilant.

Hundreds of thousands of social media posts showed women singing, waving flags and blowing horns as many enjoyed the first international football experience of their lives.

Earlier this year, five women disguised as men with beards and wigs managed to watch a football match in Azadi stadium, but in the past many have been arrested for trying to attend men’s sporting events.

“Women and men should be allowed to be happy together,” reformist MP Tayyebeh Siavashi tweeted, along with a photo of herself inside the stadium.