Six Iranians arrested for appearing in a video singing along to an American pop song were released on Wednesday, one day after being detained for what police called their "obscene" behavior, one of them said in an online posting.
In the clip, the three women and three men dance and lip synch to Pharrell Williams' "Happy", imitating the official video of the international hit. The women are not wearing headscarves, as demanded by Iran's Islamic law.
Their arrest caused outrage among fans of the song - a catchy anthem about feeling happy - who took to social media to denounce what they saw as a heavy-handed response by the Islamic Republic to a piece of harmless fun.
Pharrell Williams himself criticized the arrests. "It's beyond sad these kids were arrested for trying to spread happiness," he tweeted on Tuesday.
The incident has highlighted the struggle between Iran's conservatives and those who hope President Hassan Rohani, who has eased the country's antagonistic stance with the West, might also relax the Islamic Republic's social strictures.
Iran's state-run TV broadcast a program on Tuesday, apparently showing the six expressing regret. "They had promised us not to publish the video," said one of the women.
Tehran's police chief, Hossein Sajedinia, said he had ordered the arrest of the six youngsters because they had helped create an "obscene video clip that offended the public morals and was released in cyberspace," the ISNA news agency said.
A source close to the six said they had been released on bail.
"Hi, I'm back, thank you @pharrell and everyone who cared about us," Reihane Taravati wrote on her Instagram account. "Love you all so much and missed you so much."
However, the New York-based International Campaign for Human Rights in Iran said the video's director, Sassan Soleimani, was still being detained and it quoted a source close to the family of one of those arrested as saying they had been told they would be prosecuted.
President Rohani has delivered few social reforms since his election last year, apparently intent on conserving his political capital for seeking an end to the nuclear dispute, something that has involved a politically risky engagement with the United States - a move criticized by hardliners.
But in a tweet on Wednesday, the president - who has championed Internet freedoms in a country that has sweeping bans on social and news media sites - appeared to express support for the six.
"#Happiness is our people's right. We shouldn't be too hard on behaviors caused by joy," he wrote on his English language Twitter account, without specifically saying he was referring to the video.
It is not the first time young Iranians have used social media sites to buck social restrictions.
A Facebook page entitled "My Stealthy Freedom", where Iranian women can send in pictures of themselves without their hair covered, has garnered 331,000 likes.
"They arrested the 'Happy' kids because it was easier than arresting women from that Facebook page," said a young Iranian from Tehran.
Want to enjoy 'Zen' reading - with no ads and just the article? Subscribe todaySubscribe now