“A celebration of indecency,” the semiofficial Fars news agency wrote of the event.
An influential Friday Prayer leader, Ahmad Alamolhoda, said the dance performance had been planned by enemies set on disgracing the Shiite saint that the event was meant to honor, Fateme Zahra.
Mr. Najafi tried to defend himself. The mayor said that the girls were all younger than 9 and that he regretted that their dance had been a part of the event. But Mr. Alamohoda was having none of that.
“One cannot argue that these were children,” he said, according to the semiofficial ILNA news agency. “They were young girls who incited arousal. They made the most atrocious movements. This cannot be justified.”
On social media, Iranians, many of whom who love to dance whenever they can, mocked Mr. Alamohoda by posting an image of the six girls before their appearance next to a picture of scantily clad pole dancers.
“This is what hard-liners see, versus what other people see,” one user wrote.
Hard-liners took a different view. “A vulgar display, and the mayor is cheering it on,” one wrote.
Mr. Najafi, who as an official in the Islamic republic has extremely little space to maneuver on the issue of limiting personal freedoms, replied that he had not clapped for the girls but for the musicians who were also on stage.
“The organizers of the event,” the Entekhab news website quoted him as saying, “said the girls were all under 8 years old, 9 years old, so the dancing was not against the Sharia law. However, I admit it would have been better had that part of the program not been performed.”
It was too late.
The Tehran prosecutor’s office summoned Mr. Najafi, and the City Council, which is dominated by reformist politicians like Mr. Najafi, held an emergency meeting to discuss the episode.
During his short term as mayor of Tehran, a city of 12 million including the outskirts, Mr. Najafi was notably absent from the hard-liner-dominated state media. Some of his predecessors, among them Mahmoud Ahmadinejad and Mohammad Bagher Qalibaf, used their years as mayor of the capital as steppingstones to national political roles. Mr. Ahmadinejad became president and Mr. Qaliba the commander of the Revolutionary Guards.
Mr. Najafi, the first reformist to take on the post since 2005, seemed reined in. His administration did manage to hang billboards across the city honoring famous Iranian women, something unthinkable under the other administrations.
But as often happens in Iranian politics, victory goes to those who most rigidly interpret Islam.
On Wednesday Mr. Najafi handed in his resignation, a City Council member told the Fars news agency. Another council member said Mr. Najafi had resigned because of medical reasons.