(USA TODAY) -- Six young Iranians arrested for making a YouTube video of themselves dancing to the Pharrell Williams song Happy were released Wednesday on bail after being forced to repent on state TV for their "obscene video."
Negar Morgazavi, a journalist who reports on Iranian affairs for Voice of America, tweeted that the six were freed on $100,000 bail.
The three men and three women, all described as around 25 years old, were jailed for helping make an "obscene video clip that offended the public morals and was released in cyberspace," the Iranian Student News Agency reported Wednesday.
The blog Iranwire.com quotes Taravati Shen, who shot the video, as saying that police went to the homes of the six and confiscated their cameras, personal computers and cellphones.
One of the six, Reihnaet Taravati, also posted an Instagram message, saying, "I'm back. Thank you @pharrell and everyrone who care about us love you all so much and missed you so much."
The arrest has quickly turned into a bigger public struggle between hard-liners and more moderate forces inside Iran over any attempt to loosen social conventions.
Iranian President Hassan Rouhani entered the fray Wednesday with a none-too-subtle tweet in which he quoted himself as saying last year: "#Happiness is our people's right. We shouldn't be too hard on behaviors caused by joy."
In a weekend speech, Rouhani also said he opposed any effort to restrict the Internet.
"We ought to see (the Internet) as an opportunity. We must recognize our citizens' right to connect to the World Wide Web," he said, according to the official IRNA news agency, Reuters reports.
"Why are we so shaky? Why have we cowered in a corner, grabbing onto a shield and a wooden sword, lest we take a bullet in this culture war?" he said.
"Even if there is an onslaught, which there is, the way to face it is via modern means, not passive and cowardly methods," Rouhani added.
The police chief, in turn, calls the video a "vulgar clip which hurt public chastity" and warns young Iranians not to be seduced by video filmmakers.
The forced repentance was in sharp contrast to the written note from the six cheerful dancers that appears at the end of their fan video, which they said they put together in April.
"We have made this video as Pharrell Williams fans in 8hrs with iphone 5S," they write in the note. "'Happy' was an excuse to be happy. We enjoyed every second of making it. Hope it puts a smile on your face."
On his Facebook page, Williams said it is "beyond sad that these kids were arrested for trying to spread happiness."