Tired of contending with drug dealers, prostitutes and everyday nuisances, a group of Northwest Washington residents fought to clean up their neighborhood: They joined federal prosecutors in a civil lawsuit against the owners of an apartment building that for years has been a magnet for trouble.

Their target was Blue White Ltd., a D.C. corporation that owns a 38-unit apartment complex at 1421 12th St. NW, in the Logan Circle area. The owners, they said, routinely rebuffed their pleas to improve security even though D.C. police have been called to the property more than 100 times in seven years to respond to assaults, robberies and other crimes.

Now, in the wake of the lawsuit, the owners are promising action.

The four-story brick apartment building, nestled between O and P streets NW in a neighborhood known for its well-kept Victorian houses, is poorly lighted and poorly maintained, the neighbors said. An alley is littered with trash and overrun with rats. Syringes and condoms are strewn about the walkway. Prostitutes and drug dealers come and go from the building, they said. "It's been a daily stress situation, and particularly even more so because the owners didn't seem responsive to the problems," said Joel Gregorio, a neighbor who has two guard dogs and two alarm systems for protection.

"Just major headaches," agreed David Keifrider, who lived near the apartment building for three years before moving to another block out of frustration last November. "Gunfire would break out at any given time. There was constant traffic and drug dealing. That whole place has caused a lot of trouble."

After failing to win improvements on their own, members of the Logan Circle Community Association sought help from Operation Crackdown, a volunteer program run by the Young Lawyers Section of the Bar Association of the District of Columbia. That spurred the involvement of the U.S. attorney's office and the recent lawsuit in U.S. District Court against Blue White.

The suit was the first filed under an antidrug law, enacted by the D.C. Council last year, that gives the court authority to demand that drug-related nuisances be brought under control. Judges can order recalcitrant owners to pay damages and in some cases even seize the property itself.

Blue White officials chose to settle the dispute and signed an agreement last week. The agreement says Blue White contests the lawsuit's allegations, but the owners vowed to provide security every day from 4 p.m. until 6 a.m., install new locks, lights, security cameras and an intercom system, and to evict tenants who either engage in or facilitate crime. They also promised to improve trash pickup and tow illegally parked cars.

The agreement calls for most improvements to be made by June 7.

The settlement is subject to approval by Judge Henry H. Kennedy Jr. and calls for the court to retain jurisdiction in the dispute. Assistant U.S. attorneys Lydia Kay Griggsby and Barry Wiegand wanted that clause as an additional guarantee that the neighborhood's concerns would be addressed swiftly.

Scott A. Fenske and Gary G. Everngam, lawyers for Blue White, did not return telephone messages seeking comment on the settlement pact.

Blue White, which took over the apartment complex in 1995, receives $32,000 a month in subsidies from the federal Department of Housing and Urban Development in return for leasing units to low-income tenants. Neighborhood residents insisted that their dispute is not a struggle to rid the area of the less fortunate, but an effort to make the apartments more secure.

"Everybody recognizes there's some very innocent tenants in that building," said Andrew Hermann, a lawyer from the firm of Wilmer, Cutler & Pickering, who worked pro bono for the community group.

Eric Korpon, a neighborhood resident who helped lead the battle, said the community group got nowhere when it tried to deal directly with Blue White's officers, John Kontos and Thomas Tsianakis. He said the settlement is promising, but cautioned, "Frankly, I am not opening champagne just yet."

According to court affidavits filed by D.C. police detective Nancy M. Brown and neighborhood residents, the complex has long been a haven for drug trafficking, prostitution, public drinking, loitering and trash dumping.

D.C. police obtained 13 search warrants during the past four years to search units in the complex for cocaine, marijuana and other drugs, Brown's affidavit stated. At one point, even the National Guard was deployed to help drive out drug dealers.

Joel Gregorio related a host of aggravations in his own affidavit. Gregorio, who lives in a 70-year-old building next to the apartments and shares an alley with it, said he often saw drug deals and frequently was disturbed by gunshots, including the shooting of street lights.

In an interview, Gregorio said he has been propositioned by prostitutes who work from from evening hours into the morning. The drug dealers, meanwhile, work near the apartments along 12th Street, catering to people in cars from the District, Maryland and Virginia, he said. Several times, Gregorio said, he has witnessed people throwing drugs out of an apartment building's window to people on the street.

Another neighbor, Robert L. Gerber, submitted a court affidavit saying he moved off the block "primarily out of fear for my own security and life."

Gregorio and Gerber were among eight community activists who sued Blue White two years ago in D.C. Superior Court, demanding similar improvements. In that case, too, the owners agreed to settle with a promise to make changes. But the settlement agreement had no enforcement provisions.

The volunteer lawyers with Operation Crackdown persuaded D.C. Council members last year to overhaul nuisance laws so neighborhood residents could take action against owners of properties plagued by drug activities. In most cases, lawsuits are not necessary, according to Jennifer M. Quinn, a lawyer with Steptoe & Johnson who works pro bono as the program's chairman.

Quinn said Operation Crackdown has targeted nearly 100 properties in two years, usually resolving matters through letters demanding improvements. Its hot line number (202-828-3643) is busier than ever, she said. The new law gives neighborhood groups a more effective tool, she said, especially when they win additional help from the prosecutors' office.

Mary Brown, who lives around the corner from the apartment building, said the combined pressure makes it more likely that the problems will be eliminated.

"We couldn't be more pleased with the support we've gotten," she said.

CAPTION: David Keifrider lived near the building at 1421 12th St. NW, rear, for three years. "Just major headaches," he said.