Thousands of police and troops surrounded the sprawling La Victoria shantytown here today, searched its homes, and detained all of its adult males during a seven-hour operation meant to suppress militant opposition to military rule.

The massive search and roundup began shortly before 6 a.m., when helicopters swooped low over the district of 32,000 people while megaphones blared orders for residents to remain in their homes. Telephones and electricity were cut off, and Army and Air Force troops formed a skirmish line around the neighborhood while police conducted a house-to-house search.

Secret police agents, dressed in civilian clothes and green armbands emblazoned with the Chilean flag, moved through the streets with lists of names and addresses of political and labor activists who were driven away in vans, according to witnesses. "Remain calm," blared the loudspeakers. "This is an operation under the state of siege. Anyone who leaves their home will be taken as an agitator."

All males in the shantytown between the ages of 16 and 60, estimated to number over 5,000, later were ordered onto buses and taken to an old soccer stadium several miles away. There they were checked against police records, and those with prior arrests were separated for transport to jails and barracks. Men later released said political suspects were taken into an underground tunnel monitored by an agent wearing a ski mask.

Late today, government spokesman Francisco Cuadra announced that 227 persons from La Victoria remained under detention. He said 207 had criminal records and 30 had "subversive connections." He said police had confiscated a number of guns and knives during searches as well as a machine for fabricating grenades.

The roundup was the second carried out by military and security forces in shantytowns since President Augusto Pinochet declared a nationwide state of siege eight days ago. Authorities maintain that the operations are necessary to search for arms and weed out persons with criminal records or involvement in political terrorism.

"This is done to terrify and punish the population," said the Rev. Pierre Dubois, the neighborhood's longtime resident priest. A human rights official added, "They are trying to destroy the bases of political mobilization."

The arrests in La Victoria followed the detention of more than 350 persons in the Raul Silva Henriquez shantytown last Saturday and more than 150 other arrests around the country in separate operations by secret police during the last week.

Authorities ordered 103 of those imprisoned after the Silva Henriquez raid into internal exile at a camp in northern Chile Tuesday, saying they had criminal records. Thirty-two leftist activists were sent to other locations yesterday, and others have been released.

Cuadra said today that in addition to those arrested in the La Victoria raid, 51 persons remained under detention at police stations, barracks and secret police installations. Human rights lawyers said they believe the figure may be several times higher.

The neighborhood chosen for today's crackdown, La Victoria, has won renown during the past 18 months as the most militant focus of opposition to Gen. Pinochet's government and a stronghold of leftist political parties. Its sandy streets have been regularly sealed off with barricades of flaming tires during protests. Walls are covered with slogans and colorful murals, including several of the violent Revolutionary Left Movement.

Several residents have been killed during clashes between police and demonstrators in the neighborhood, including Andre Jarlan, a French priest struck by a stray bullet reportedly fired by police during protests in September.

Authorities carried out a similar roundup in La Victoria following the first mass antigovernment protest against military rule in May 1983. During the government's period of political liberalization after August 1983, however, police often stayed out of the neighborhood during protests and avoided all-out confrontations with its residents.

Today, the troops withdrew shortly after noon. Several residents said police had ransacked their homes and carried away literature, money and even appliances during the search for arms.

"They went through everything, even the dirty clothes in the washing machine," said Lina Briss, a member of a local church group. Briss said police confiscated three magazines published by Catholic church organizations, prompting her to ask one officer if it were illegal to possess Catholic literature.

"Don't you know the church is infilitrated by Communists?" Briss said the policeman responded. "All the priests here are Communists who hand out subversive propaganda. Don't you realize you are being brainwashed?"

At the San Eugenio Stadium several miles away, the men of La Victoria lined up at desks on the playing field to have their records checked. Soldiers posted in the wooden grandstands trained weapons on the crowd, witnesses later said. Suspected political activists were called by name over loudspeakers and asked to come forward.

Those without criminal or political records were released in groups of several dozen to walk back to their homes. The main entrance to the stadium was guarded by a line of soldiers with automatic weapons, who paced before a faded wall slogan reading, "The people say, 'Enough of the dictatorship.' "