Salafist Muslims in socially divided Tunisia tried to prevent the filming of current Internet craze the "Harlem Shake" at a school on Wednesday, but were driven off after coming to blows with students, an AFP correspondent said.
At another school, south of the capital, the principal called in police to stop filming there, the interior ministry said. Students reacted by hurling stones at the police, who responded with tear gas.
When a dozen or so ultra-conservative Muslims, some of them women in veils, showed up at the Bourguiba Language Institute in the El Khadra neighbourhood of Tunis, a Salafist bastion, students shouted "Get out, get out!"
One of the Salafists, shouted "Our brothers in Palestine are being killed by Israelis, and you are dancing," while saying he wanted to make the students understand the difference in Islam between behaviour that is "haram" (prohibited) and "halal" (permitted).
Another, bearded and wearing military gear, was carrying a petrol bomb, which he didn't use.
The Salafists eventually withdrew, and the students were able to film their production.
A number of social media sites belonging to Salafists and other Islamist groups have denounced the "Harlem Shake" as indecent.
In Sousse, 120 kilometres (75 miles) south of Tunis, students tried to stage a "Harlem Shake," but their principal called the police, interior ministry spokesman Khaled Tarrouche told AFP.
"The students gathered outside the school, near a hospital, and began igniting smoke bombs," he said.
"The security forces tried to convince them to put out the smoke bombs, but they refused and threw stones at them and wounded two policemen. The forces of order were obliged to respond with tear gas," he added.
More and more people around the world are emulating the dance craze, which was sparked by a group of Australian teenagers who uploaded a 31-second clip "The Harlem Shake v1 (TSCS original)" onto YouTube earlier this month.
It has since been viewed millions of times.
Video footage, which shows participants smoking, dancing wildly in uncoordinated manner and simulating sexual acts, has spread on the Internet, with dozens of different versions attracting millions of views.
On Monday, Education Minister Abdellatif Abid said a probe had been ordered into the staging two days earlier of a "Harlem Shake" by students in a Tunis suburb.
He said there could be expulsions of students or sacking of educational staff who were behind the staging of the dance.
In response, the ministry's website was hacked and a call went out on social media for the staging of a mega Harlem Shake in front of the ministry on Friday.
The Saturday version was purportedly staged by students from Menzah 6 district in a school compound, with some in shorts and others sporting fake beards and the tunics typically worn by Salafists (http://www.youtube.com/watch?v=KSDJJsvzpbY).
The Islamist movement has carried out a wave of attacks in the past year, including on galleries, cultural festivals and Sufi shrines.
In June, Salafists destroyed works of art exhibited in a chic suburb of Tunis which they considered "blasphemous."
That sparked clashes across the country that saw police stations and political party offices torched, in some of the worst violence since the January 2011 revolution that toppled president Zine El Abidine Ben Ali.
The secular opposition regularly accuses Tunisia's ruling Islamist party Ennahda of allowing a slow Islamisation of the society.
The education minister is a member of Ettakatol, a centre-left secular ally of Ennahda.