Hundreds of Middle Eastern, Iranian and other men and teenagers were arrested this week after registering with federal immigration officers, and their supporters today charged that the detentions were not catching terrorists but harassing immigrants.

The Immigration and Naturalization Service had ordered all male visitors, 16 and older, on temporary visas from Iran, Iraq, Libya, Sudan or Syria to register and to be photographed and fingerprinted at local INS offices by Monday.

Those who overstayed their temporary student or tourist visas are being detained.

Men from another 13 nations, mostly from the Middle East (including Saudi Arabia) and North Africa, have been ordered to appear and register next month.

The efforts are an attempt to know who is in the country, legally and illegally, or is applying for residency status, and possibly to ferret out those who might know of terrorist activities or pose a threat to U.S. interests.

In Southern California, home to the second-largest community of Iranians outside of Tehran, the arrests angered many. More than 3,000 people demonstrated outside of INS offices here on Wednesday, some chanting and waving signs that read: "What Next? Concentration Camps?"

Many of the Iranians detained have relatives who fled Iran after the fall of the shah and the rise of the Ayatollah Khomeni in 1979. The Iranian community is established around Westwood and Beverly Hills. Iranians consider themselves among the wealthiest and most assimilated immigrants in the nation, often introducing themselves as "Persians" and not Iranians. Many are Jewish or Christian.

"If you were a terrorist, would you show up to be fingerprinted? Only law-abiding people are showing up. This is nuts. These people have been here for ages; these are not criminals," said Babak Sotoodesh, an immigrant from Iran who is an attorney and president of the Alliance of Iranian Americans, an advocacy group.

Others applauded the detentions.

"INS has a duty and an obligation to the community at large to apprehend and deport people who break the law," said Dan Stein, executive director of the Federation for American Immigration Reform. "How many times have we seen over the last couple years where people who should have been detained by the INS were freed and then went on to kill people?"

Lawyers for some of the men say as many as 500 Iranians have been detained, though INS officials in Washington say the number is far lower. The men have been jailed, but most are being freed after posting bail, usually about $1,000.

Justice Department spokesman Jorge Martinez in Washington said that about 200 registrants were in custody Wednesday and that the number had dropped to fewer than 100 by today.

"L.A. is really a unique situation. We haven't seen this in any other part of the country," Martinez said. "A lot of individuals who were required to register in Los Angeles waited until the last minute, and a lot of the individuals who came in had visa overstays or other problems. . . . That's why you saw a lot of people detained in one day."

INS officials said immigration officers have no choice but to arrest an immigrant who is out of status. Although concentrated in Los Angeles, arrests have also been made at INS offices from Houston to Cleveland to Washington, officials said.

One man detained at the INS's Arlington office on Monday was Soheil Varamini, 18, who came with his family to the United States from Iran when he was 2. A freshman at George Mason University, Varamini fears authorities might deport him to a country where he does not speak the language and is not familiar with the culture, according to his sister, Nancy Hedayet.

Hedayet, 31, said Varamini is guilty only of a minor paperwork problem and was treated badly by INS officials.

"They misled people by just saying, 'Come and get your picture taken,' " said Hedayet, who lives in Rockville. "Then they round people up like animals and treat them like criminals. . . . Why do they have to terrorize people who only love this country?"

Eggen reported from Washington. Special correspondent Kimberly Edds contributed to this report from Los Angeles.

Gisroo Mohajeri is comforted by her husband, Ali, a U.S. citizen, in Los Angeles after learning her 16-year-old son faces deportation proceedings.