Six Iranians who were accused of obscene behaviour for appearing in a video singing along to the American pop song "Happy" have been handed suspended sentences of 91 lashes and six months in prison.

Another defendant, who faced heavier charges in connection to the video, was handed a suspended sentence of one year in jail and 91 lashes by the authorities.

The sentences are suspended for three years, meaning that if any of the seven is found guilty of a similar offence, the punishment is then carried out, defence attorney Farshid Rofugaran told the AP news agency on Friday.

The defendants, four men and three women, were detained by police in May after six of them were shown lip syncing to Pharrell Williams' hit song. They were released shortly afterwards.

Rofugaran said the suspended jail term was the punishment for acting in the video and the lashes were for ignoring Islamic norms. 

The arrests drew condemnation from the US singer and his fans through social media, as well as indirect criticism from President Hassan Rouhani.

"The way to deal with cultural issues is cultural work, not policemen and [detention] vans and strong-arm tactics," the president told a gathering of conservative clerics in the religious city of Mashhad earlier this month.

Source: Agencies