With the onset of higher spring temperatures, some women have sought to shed all or parts of the often stifling Islamic uniform. That has brought the morality police back onto the streets of the capital, despite promises by Mr. Rouhani that he would prevent their return. In recent weeks, the authorities raided several parties in the capital and the Caspian Sea region where there was drinking and dancing — both forbidden in Iran.

Nevertheless, the authorities seem hesitant to come down too severely on those who violate the norms. Several popular actors, actresses and athletes, who wield considerable influence through social media platforms, were given a relative slap on the wrist last week after being caught in a raid on an illegal party, local news outlets reported.

“Those artists who play in movies and television series and athletes have the special attention of the youths,” Mr. Jafar-Dolatabadi, who seems to be at the center of the crackdown, said on the judiciary’s website, Mizan. “If you take part in vulgar sessions, we will publicly announce your names.”

The strategy of Iran’s hard-liners is to single out special cases, analysts say, extracting televised mea culpas from prominent figures like Ms. Arab to warn the general public that the ideological lines are not to be overstepped too obviously.

Many here doubt the strategy will have much effect. “They are doing such things to show us who is in power,” Mojgan Faraji, a reformist journalist, said of the hard-liners. “But in the end, they lose, as the gap between them and the society is only widening.”

State television has been steadily losing influence, facing hundreds of foreign-based Persian-language satellite channels, the semiofficial Fars News Agency complained recently.

Nevertheless, many pitfalls remain for women. Last week, a female politician, Minoo Khaleghi, who had won election to Parliament as a moderate, was told she would not be allowed to take her seat after images of her emerged on social media showing her without the obligatory head scarf. On Saturday, Mr. Jafar-Dolatabadi ordered Ms. Khaleghi to explain to judicial officials why such images of her existed, the reformist newspaper Shargh reported.

On the same program, Iran’s prosecutor for cybercrimes, Javad Babaei, announced the arrest of the eight people, apparently in connection with online modeling. His unit is focusing on Instagram, which is not blocked in Iran. “Sterilizing popular cyberspaces is on our agenda,” he said, criticizing the introduction of broadband in the country “without considering the consequences.”