A heavily armed D.C. police team and city building code inspectors evicted 35 squatters from two abandoned buildings at 14th Street and Park Road NW yesterday, ending a six-month-long occupation by a group of men whose sometimes violent activities had frightened the neighborhood.

Uniformed police carrying shotguns began their sweep just before 7 a.m. as sharpshooters and marksmen provided cover from nearby rooftops.

Neighbors watched from doorways and windows, some showing apparent relief as police took the men away. Some of the evicted men led desperate and violent lives which had come to dominate the street.

One woman rocking a baby smiled as she watched the evictions from a window ledge, looked at the child and instructed it to speak, "Say, 'Mama don't even take me outside because I'm scared.' "

During the last six months, police said, about 90 persons known to hang out at the buildings were arrested on the block for buying and selling narcotics. Last November the body of a woman was found on the roof of one of the abandoned buildings.

Two weeks ago, police said, a 12-year-old girl was shot in the back and seriously injured when she walked into a drug-related shoot-out on the street. No one has been charged in either incident.

The 1400 block of Park Road was closed for nearly five hours as police checked out the buildings and occupants.

A police spokesman said police believed l0 persons wanted for an assortment of crimes were holed up in the building, but they did not find them. There were no arrests and no injuries.

The evicted squatters were offered emergency housing by the city, but housing officials said many of them refused it.

The two buildings, located at 1445 and 1451 Park Rd. NW, had come to symbolize what some officials say is one of the city's main housing and public safety problems--abandoned buildings, whose numbers are approaching the thousands as many area landlords struggle to stave off foreclosure.

"It's a typical scenario where an apartment owner does not have sufficient cash flow to take care of his maintanence," said D.C. City Council member H.R. Crawford, who is familiar with the buildings.

"You'll find numerous vacant buildings throughout Adams-Morgan and Southeast Washington mainly because of rent control, the condo craze and tight money," he said.

The result is often a problem with squatters, whose numbers are growing along with those of the homeless street people, according to spokesmen for several community activist groups.

When immigrants are involved, they say, the problem is usually worse because of language and cultural differences.

City records show the D.C. Housing Department spent more than $80,000 since l980 attempting to help the owners maintain plumbing and make basic repairs, but that it apparently made no difference. Tenants attempted to correct the problems by forming the Park Road Apartments Tenants Association early last year. The group contended then that the building's landlord had failed to maintain the buildings.

The two buildings on Park Road were inspected by city officials, who recommended last October that they be condemned. Each building has more than 2,000 housing, fire and sanitation code violations, according to city inspectors. The property is now in foreclosure proceedings.

City officials ordered the building evacuated last October, but after most of the l00 legitimate tenants left, homeless immigrants from Cuba, Haiti and several South American countries began moving in. According to neighbors, they were later joined by unemployed men. The buildings became a "home office" for drug sales, police said. Neighbors said dice games and drug sales were commonplace and fighting often accompanied both activities.

"When the fighting starts you better hit the ground, child," the woman with the baby said. Her neighbor agreed. "If you don't get shot with an illegal gun, they'll come at you with a machete."

The street was so consumed by fear, one of them said, that "even if a car backfires, you better hit the ground."