Iran Happy Pharrell Williams
Six Iranian youths face trial for dancing in a YouTube version of Pharrell Williams' song Happy YouTube

The six young Iranians who danced in a YouTube version of Pharrell Williams' hit song Happy have been handed suspended sentence of six months in prison and 91 lashes.

The lawyer for the group, Farshid Rofugaran, told IranWire a suspended sentence becomes null after a certain period of time, so the verdict will likely not be carried out.

But he noted that he could not confirm his clients' situation until an official notification was issued. The Happy Iranians, as they were nicknamed, will also have to be careful not to repeat a similar offence in the next six months in order to avoid the suspended sentences becoming a reality.

The three men and three women, who have an average age of 25, were arrested in May, as police accused them of helping make an "obscene video clip that offended the public morals", and later released on bail. The clip was viewed by more than 100,000 people on YouTube.

The arrests triggered an international outcry and were condemned, among others, by Williams, whose hit was downloaded millions of times in the US and danced by people all over the world.

"It is beyond sad that these kids were arrested for trying to spread happiness," the singer wrote on his Facebook page.

The six friends faced a series of charges including having sex outside marriage, posting on "the vulgar YouTube channel", failing to observe proper Islamic dress, dancing and having contacts with contact with foreign television networks, an allegation that could entail the more serious offence of spying, The Times reported.

Under Islamic law, women must cover themselves from head to toe and even though there were hopes of a liberalisation in laws following last year's election of President Hassan Rouhani, the internet is still heavily filtered, with access to popular social networking sites prohibited in Iran.

But the case has raised frictions between reformists and conservatives within the regime.