TEHRAN — Thousands of Iranians took to the streets of the historic city of Isfahan on Wednesday to protest several acid attacks on women. The attacks had coincided with the passage of a law designed to protect those who correct people deemed to be acting in an “un-Islamic” way.

A local official said on Wednesday that “eight to nine” women had been attacked over the past three weeks by men on motorcycles who splashed them with acid in Isfahan, one of Iran’s largest urban centers and the country’s chief tourist destination. Some of the women were blinded or disfigured.

The protesters — more than 2,000, according to the semiofficial news agency Fars — gathered in front of the local judiciary office and shouted slogans against extremists whom the protesters likened to supporters of Islamic State militants. They also called for the city’s Friday Prayer leader and the prosecutor to step down, witnesses said. Critics have long accused the Iranian authorities of playing down episodes that could embarrass leaders rather than investigating the cases.

“We do not want to propagate virtues by acid,” some of the protesters chanted, a reference to the Islamic obligation of “propagating virtue and preventing vice.” Others shouted, “Death to extremists.”