Cedar Knoll, Washington's minimum-security facility for delinquent juveniles in suburban Maryland, will be closed permanently about July 1 and the youths living there transferred to community-based housing and other detention compounds, Audrey Rowe, D.C. commissioner for social services, announced yesterday.

Rowe said the closing is "coincidental" to last week's filing of a lawsuit against the city by the independent D.C. Public Defender Service, alleging inhabitable conditions and inadequate treatment programs at Cedar Knoll and Oak Hill.

"We have recognized for some time that we have not been happy with the programming" at Cedar Knoll, Rowe said. "We've wanted to improve that programming."

She said that the $3.7 million that previously had been used to operate Cedar Knoll has been diverted to improve the quality of services at other facilities, such as Oak Hill, the city's detention center for older youths and young adults. Both facilities are near Laurel.

Attorneys at the defender service hailed the city's announcement. "We're pleased to hear that the District has set a firm timetable for closing down Cedar Knoll," defender spokesman Randy Hertz said. "This is clearly the best result for all the children held at Cedar Knoll."

The closing of Cedar Knoll, where approximately 70 to 100 youths aged 12 to 15 are held at any given time, was first ordered nearly two years ago by Mayor Marion Barry. According to Rowe, she and other officials had been waiting for court approval of a plan to transfer the children.

That approval was no longer needed, she said, because the court case that had been pending was recently declared moot because the children involved grew older and left the facility.

"We were under the impression that our hands were tied," Rowe said. "Otherwise I would have closed Cedar Knoll Sept. 30." She said her office had been negotiating for months with the defender service about the proposed transfer of the youths and expressed surprise that the lawsuit had been filed.

Hertz said the suit was "the only procedural mechanism for implementing the changes" announced yesterday, because the earlier court action had been dismissed.

But Hertz was quick to add that negotiations with Rowe's agency had concerned only children held pending trial, and not those already sentenced. The closing of Cedar Knoll, he said, leaves unresolved many of the problems alleged in the suit filed last week.

The suit contended among other things that juveniles held by the city live in vermin-infested housing that does not meet fire codes; that educational and therapeutic programs are inadequate, and that youths are subjected to physical abuse by counselors.

It alleged that the detention facilities are seriously understaffed; that the mental health needs of some youths are never diagnosed or are ignored; that some teachers are not qualified, and that youths are placed together in classes regardless of their educational levels or mental abilities.

Under the plan announced yesterday, approximately 100 staff members who work at Cedar Knoll will be transferred to Oak Hill. Some of the youths will be sent to two new shelter homes and others to a newly refurbished "receiving home" in Northeast Washington.

Rowe said many of the youths will be transferred to their parents and monitored by social workers.

The transfers are to be supervised by a juvenile detention expert, Paul DeMuro of Montclair, N.J. DeMuro is a former vice president of the National Council on Crime and Delinquency and former Pennsylvania commissioner of children and youth.