CNN  — 

A group of Iranians attacked a morality police van in Tehran last week after two young women were detained for “improperly” wearing a compulsory headscarf, according to state-owned Iranian media and activists.

Officers fired shots into the air to disperse the crowd of people who tore off one of the doors of the vehicle, according to a report by the state-owned IRNA news agency about the February 15 incident. Iran’s morality police are tasked with enforcing the country’s strict social rules.

The group prevented the officers from driving the women away, IRNA said citing an unnamed police official. The standoff ended when the women were released from the van, according to the police source.

The incident took place in the East Tehran neighborhood of Narmak, where Iran’s hardline former President Mahmoud Ahmadinejad lives.

“When the morality police personnel were issuing a warning to two ladies with improper hijab, people in the area surrounded them and prevented them from driving the two ladies away,” the police source told IRNA. “After the two ladies got off the police van, the crowd dispersed and that was the end of the incident.”

Video of the incident showed people honking their car horns in apparent protest. A man is heard shouting “Let her go!” as a group of people surround the van. The sound of gunshots is then heard.

The headscarf, or the hijab, has been a mandatory part of women’s dress in Iran since the 1979 Islamic revolution led to clerical rule of the country.

But in recent years, some women have mounted opposition to headscarf rules by staging sporadic street demonstrations, some of which have gone viral on social media.

Many women have also observed the dress rules more loosely in recent years. While signs instructing women to wear hijab adorn the walls of nearly every shop and restaurant, many wear short scarves which only slightly cover their heads.

In Iran’s ski resorts, for instance, signs admonish female skiers to “obey Islamic affairs,” but many swap their headscarves for ski hats. The morality police, who for years were said to chase transgressors down the slopes on skis, have a dwindling presence in these areas.

The penalty for breaking hijab rules is also being reduced, with fines of around $15 becoming more common than arrests.

For commentators and activists, the incident in Tehran may be a sign of more acts of rebellion against the morality police to come.

“Iranians are very angry with morality police these days,” tweeted Masih Alinejad, the Iranian activist behind the “White Wednesday” social media campaign against mandatory hijabs.

Update: This article has been updated to remove a tweet containing images that CNN could not independently verify. This is a developing story and will continue to be updated.