At a parliamentary hearing of the Commission for National Security that was convened to hear complaints, “Some of the members of Parliament complained that the security force should not put itself in a position to deal with such issues,” said Dariush Ghanbari, a member of the commission.

When one woman, Nazanin, 28, was stopped last month in Vanak Square, she thought she had dressed more modestly than usual, she said. But she was told that her coat was tight and showed the shape of her body.

“I just joked with them and tried to stay calm, but they told me to sit so that they could see how far my pants would pull up in a sitting position,” said Nazanin, a reporter. She was told by the police officers that they wanted to help her look modest so men would not look at her and cause her inconvenience, she said.

She received a warning about her large sunglasses, her coat, her eyeliner and her socks, which the police officers said should be longer. She was allowed to go after she signed a letter, which included her name and address, saying she would not appear in public like that again. The police have said the letters will be used against violators in court if they defy the rules a second time.

Another woman, Niloofar, 28, who responded angrily to the police when she was told to fix her head scarf because too much of her hair was showing, said she was kept in a bus for five hours.