The dance brought a rare moment of light-hearted expression of dissidence amid Egypt's political turmoil that has left dozens dead and hundreds injured in recent months.
As the protesters did the Harlem Shake, a dance to a song with the same name, the Islamist group shut down its office and turned off the lights.
Videos featuring entire offices dancing to the Harlem Shake by the musician, Baauer, have been piling up on YouTube.
On Saturday Egyptian police said they arrested
four students who filmed themselves publicly dancing the Harlem Shake in their underwear.
The four pharmaceutical students shocked residents of a middle class Cairo neighborhood when they removed most of their clothes and videotaped themselves performing the pelvis-thrusting dance, a police official said.
The craze also reached Tunisia, the birthplace of the Arab Spring began. A group of university students in the capital Tunis did the Harlem Shake on Wednesday, but extremist Salafis tried to stop them.
When a dozen ultra-conservative Muslim youths, some of them women in veils, showed up at the Bourguiba Language Institute in Tunis's El Khadra neighborhood, 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." He said he wanted to explain what behavior Islam considers as "haram" (prohibited) and "halal" (permitted).
That drew the ire of one youth, wearing the mask of a deformed face featured in the American horror film "Scream."
"Mind your own business and keep your lessons of morality for others," he shouted. "No guy like you is going to stop us from doing what we want!"
Another Salafist, bearded and wearing military gear, was found to be carrying a petrol bomb, but was surrounded by teachers who prevented him from using it.
The incident degenerated into fisticuffs before the Salafists retreated.
Masters student and organizer Fidaa Jebali later showed an AFP correspondent a red welt on her cheek.
"One of the veiled girls called me an apostate before slapping me," said Jebali from behind huge rose-colored spectacles. "It's not normal to have to suffer this in 2013."
Once the scuffle ended, the students were able to film themselves doing the Harlem Shake.
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.