The arrests appeared to be an attempt by Iran's ruling hard-line clerics to rein in their militant supporters, reflecting fears that the violence might only stoke the past week's anti-government protests, which were the largest in months.
The Islamic regime is worried about alienating a restive public at a time when the United States has stepped up pressure against Tehran over its nuclear program and alleged links to the al-Qaida terror network.
In Washington, the White House called on Iran to "protect the human rights of the students."
"The United States views with great concern the use of violence against Iranian students peacefully expressing their political views," spokesman Ari Fleischer said. "Iranians, like all people, have a right to determine their own destiny, and the United States supports their aspirations to live in freedom."
CBS News Correspondent Mark Knoller says the White House is "clearly seeking to encourage dissent in Iran" by issuing the statement and expressing alarm over the attacks on the protesters.
The militants, who pledge allegiance to Iran's supreme leader Ayatollah Ali Khamenei, usually act with impunity, breaking up demonstrations and punishing protesters.
The past week, they did exactly that against young Iranians who were holding nightly demonstrations since Tuesday, chanting anti-government slogans, including unprecedented calls for Khamenei's death.
Friday night saw the most intense violence of the week, even though there was no anti-government protest. Militants went on a rampage across the city, beating pedestrians with clubs, brandishing knives, firing machine guns in the air and hurling rocks at homes. Dozens of militants stormed at least two university dormitories, beating up students in their beds and taking several of them away.
"We were sleeping in our beds. Suddenly we heard windows being smashed," said Mojtaba Najafi, a student who was in the Hemmat dormitory of Allameh Tabatabai University, when the attacks began.
"It was the most brutal way of attacking a human being. They beat up the guard before entering our dormitory. They see no borders, no limits."
About 200 students were sleeping in their rooms, Najafi said. More than 50 students were injured and taken to the hospital, and about two dozen had disappeared after the attack.
The Hemmat dormitory, in the capital's western suburbs, resembled a war-stricken building with shattered glass and broken doors scattered all around.
There were also attacks at Tehran University's Chamran dormitory before dawn Saturday, other students said.
What followed was a rare crackdown on the militants. After increasing calls by reformers for action, the judiciary, which is controlled by hard-line clerics, ordered the arrests.
"Scores of people who suspiciously attacked a dormitory and inflicted damages have been identified and arrested," the judiciary said in a statement aired on Tehran Radio.
Among those arrested was Saeed Asghar, a militant leader who two years ago shot and seriously wounded Saeed Hajjarian, an architect of democratic reforms and a top adviser to reformist President Mohammad Khatami, the radio reported.
In 1999, Iran saw the worst street protests since the 1979 Islamic revolution, sparked by a similar attack on a Tehran University dorm that led to the death of at least one student.
Last week's demonstrations have been much smaller and less violent. But the hard-line leadership appeared worried they could flare into something much larger at a time when U.S. pressure is high and young Iranians are even more frustrated over the lack of political reform.
Tehran-based political analyst Saeed Leylaz said Iran's rulers are feeling the U.S. presence in neighboring Iraq and Afghanistan. "With Khatami failing to fulfill promises and the U.S. increasing its presence, the Iranians, especially the young population, have become emboldened in calling for the ouster of the ruling establishment," he said.
"The authorities see American hands in the latest protests," he said. The arrests "are a careful response to keeping the situation under control."
At the same time, the police appear to want to disassociate themselves from accusations they support the militants.
During the 1999 protests, police officers - under the control of an extremist hard-line chief - joined militants in attacking students. But the appointment of a new, more moderate police chief has led to a less reactive policy. Since last year, police officers have stood between student-led protesters and vigilantes in attempts to reduce tensions.
Hard-line clerics control key government institutions and have so far succeeded in blocking major social, political and economic reforms sought by Khatami and his supporters.