Twenty-one persons were arrested on federal and local drug distribution charges here yesterday in an attempt by D.C. police to disrupt a major market for the painkiller Dilaudid that they said had developed near the Garnet-Patterson Junior High School in Northwest Washington.

Police and federal officials said that among those arrested were four persons indicted Thursday by a federal grand jury under a recently passed federal statue that carries a penalty of up to 30 years in prison and fines of $250,000 for distributing narcotics near school property.

Complaints by parents and school officials -- that students often were pressured to purchase narcotics as they passed through the drug distribution area on their way to classes at Garnet-Patterson -- prompted the four-month investigation that led to the arrests, authorities said.

A total of 37 indictments for drug distribution were returned this week by grand juries in D.C. Superior Court and U.S. District Court, culminating the undercover investigation in which detectives videotaped sales of Dilaudid, a narcotic frequently used as a substitute for heroin, according to an assistant U.S. attorney.

Lt. James Dotson, head of the police 3rd District narcotics enforcement unit, said the area near Garnet-Patterson, at 10th and V streets NW, was one of the city's most popular distribution points for suburbanites seeking narcotics.

"It was to the point that they were dealing right there on the sidewalk with the kids having to come by to go to school," Dotson said. "We had a lot of complaints. Parents were pulling there kids out of the junior high and sending them to other schools.

"We had several reports from the children and the parents and teachers that the dealers would try to sell to the kids," Dotson said. "They would try to talk them into buying it." Dotson said that school administrators and parents cooperated in the police investigation.

Janis Cromer, spokeswoman for the D.C. public schools, said last night that officials "for some time had been concerned" about drug sales near Garnet-Patterson, but she was unable to say exactly how officials had participated in the investigation.

U.S. Park Police and federal immigration and customs authorities assisted D.C. police in the drug investigation. Assistant U.S. Attorney Robert McDaniel said that for several months undercover officers posing as drug users had bought narcotics near the school and that the transactions frequently were recorded on video and audio tape.

He said that police made more than 100 purchases totalling about $5,000, mostly of Dilaudid, which is often sold on the streets for up to $50 for a 4-mg tablet.

"It's fair to say that this is one of the city's most notorious open-air pill markets," McDaniel said. "Police estimate that the annual revenues from Dilaudid sales there reach $5 million."

Of this week's indictments, 32 were returned by Superior Court grand juries on local drug distribution charges, which carry a mandatory minimum sentence of four to 12 years.

A federal grand jury on Thursday indicted five persons under a federal law passed in October setting stiff penalties for distributing narcotics within 1,000 feet of a school or school property.

The arrests marked the second major drug raid here in two days. On Thursday 161 officers from the District, U.S. Park and Prince George's County police conducted a massive sweep near 45th and Quarles streets NE.

Prince George's police, who ran part of the operation of their side of the county line, said they arrested 15 persons on drug charges and six others on prior warrants. D.C. police took credit for 34 drug arrests, plus other arrests for traffic violations, disorderly conduct, weapons charges, unregistered ammunition charges and existing warrants.