Iran's vice president for women's affairs has said that hijab and banning shorts for men were a "social regulation" insisting that "there is no city in the world where you can walk naked."
After a spate of protests stirred debate over the mandatory headscarf, the vice president, Massoumeh Ebtekar, told a press conference in Tehran that the government opposed using "force" to ensure women wear the hijab,
She said every country has a dress code: "There is no city in the world where you can walk naked in the streets and you won't be approached by a particular regulatory body." She said Iran's hijab laws -- which require women to wear a headscarf and long coat, as well as banning shorts for men -- were a "social regulation".
"Our position is that it's a regulation but the use of force -- we don't go along with that type of enforcement," she said.
"That is contrary to the basic principles and philosophy that the government of (President Hassan) Rouhani follows." Her comments follow a string of protests, mostly in Tehran, in which more than a dozen woman have stood in main thoroughfares without their headscarves.
The women risk prison sentences of up to two months for not wearing the headscarf, but up to 10 years if they are found to be encouraging others.
Tehran police chief Hossein Rahimi took a rather tougher line than Ebtekar earlier this week, telling the conservative Fars news agency that Islamic laws were "obligatory for all citizens".
"These people will be firmly dealt with by the police," he said.
He was responding to widespread criticism on social media after a video showed an officer shoving one of the women protesters off a plinth.
"We have reminded our officers to comply with legal requirements when dealing with all people," said Rahimi.
In practice clothing rules have been steadily eroding for years, with many women wearing loose and colourful headscarves and letting them drop entirely, particularly in wealthier areas.
Since Rouhani came to power in 2013, the presence of the morality police who enforced clothing rules has been greatly reduced.
Ebtekar said the government needs "this dialogue" with the younger generation, which no longer shares the same values as those who grew up during the 1979 revolution.
But she defended Iran's record on female empowerment, saying the Islamic republic had brought "true advancement" for women in higher education, politics and sports.
Iranian society is generally freer for women than many conservative Islamic countries, but activists complain they are still under-represented in government, particularly after Rouhani again failed to appoint a single female minister last summer.
Women also have less weight than men in Iran's Islamic legal system, including less right to inheritance and a ban on leaving the country without male permission.