In Iran, social freedom has long been measured by the prevalence of male-female hand holding or how far back women push their headscarves. So the six young men and women who danced together on rooftops, hair bouncing, in their version of the viral feel-good hit "Happy" were taking a risk.

A generation ago, Ayatollah Ruhollah Khomeini, the father of Iran’s 1979 Islamic revolution, laid down an uncompromising standard when he said that God “did not create man so that he could have fun… There is no humor in Islam. There is no fun in Islam.”

The six dancers were arrested, and last night they were presented on Iranian television soon after their arrest, with their backs to the camera. Tehran police chief Hossein Sajedinia said the video was “a vulgar clip" which "hurt public chastity” and warned Iranians against further “corrupt” acts.

The arrest, which sparked a firestorm of international criticism on social media, came after President Hassan Rouhani called in a weekend speech for greater Internet freedom. Today, amid reports that the “Happy” group had been released, Mr. Rouhani tweeted a quote from a speech of his last June: “#Happiness is our people’s right. We shouldn’t be too hard on behaviors caused by joy.”

Waging a war

From the outside, Iran’s culture wars may appear banal and quibbling.

But a coterie of fundamentalist officials see themselves as the guardians of the Islamic Republic’s cultural purity and warn against "cultural invasion" by the West. With Pharrell Williams' hit video for "Happy" spawning copycats in 140 countries, it is not surprising Tehran's version, which garnered 165,000 hits even before the arrest, eventually prompted a heavy-handed response.

Producing such a video was always a risk in Iran, where strict rules govern women’s hair covering, forbid dancing in public, and limit public contact between unmarried men and women.

This is what Rouhani is up against as he tries to fulfill campaign promises of greater social freedom, which have so far seen limited progress, such as the opening up of music and media.

“Why are we so shaky? Why have we cowered in a corner, grabbing onto a shield and wooden sword, lest we take a bullet in this culture war?” he said this weekend, before the "Happy" arrests. “Even if there is an onslaught, which there is, the way to face it is via modern means, not passive and cowardly methods.”

Push and pull

Several other Iranian versions of “Happy” have been produced, coinciding with a separate new Internet phenomenon, in which Iranian women post photographs of themselves outdoors but unseen, joyfully casting off their headscarves.

Two weeks ago a protest was held in Tehran against the anti-headscarf campaign and a broader loosening of modesty standards as spring temperatures rise. Fundamentalist protesters, including women wearing long black chadors, complained that those women were wearing “bad hijab."

The arrest of the “Happy” group could well backfire, spawning mockeries of the rules, such as anonymous postings of fun-less versions of “Happy” in full Islamic covering.

In the TV broadcast after the arrest, the six stood with heads hung low as if forced into a confession, and said they were duped into making the video, claiming they thought they were taking part in an audition.

The Tehran police chief boasted that when the order came to arrest the six, his agents identified them within two hours – their names were prominently displayed on the video credits – and picked them up within six hours. No one mentioned the fact that the video had already been posted for weeks.

The news website IranWire quoted one source saying, “All of the young producers received phone calls informing them that a friend had suffered a car accident and required their help. When they arrived at the address they had been given over the phone, security forces were waiting to arrest them.”

The source told IranWire yesterday that they would be released today if they posted a $10,000 bail and agreed not to speak to the media.