Facilities for detaining juveniles at D.C. Superior Court violate federal law, and the District will lose more than $200,000 in federal grant funds if conditions there are not corrected, according to U.S. Justice Department officials.

A recent federal inspection of the court's youth detention facilities found, among other violations, that juveniles come in regular contact with adult offenders being held in the cell block and that the facility is used to detain youths who are accused only of truancy as well as juveniles not charged with any crime.

These findings of improper detention of juveniles in the courthouse cell block, a violation of grant requirements, were contained in a letter sent Tuesday by James M. Wootton, deputy administrator for the federal Office of Juvenile Justice and Delinquency Prevention, to the city's director for criminal justice planning.

According to the letter, a copy of which was obtained by The Washington Post, an inspection of the cell block in October revealed that the city "is in substantial noncompliance" with federal regulations and that the cell block is "inappropriate for holding juveniles."

Unless the cell block is brought into compliance, Wootton warned, the city will receive no grant funds for fiscal 1986. The funds are used for delinquency prevention and other juvenile criminal justice programs.

The letter has prompted a flurry of countercharges by city officials, who maintain that the cell block is controlled by the U.S. Marshal's Service -- another branch of the Justice Department -- and that the District is not responsible for what happens there.

City Administrator Thomas Downs dismissed the complaints and said that the Marshal's Service is responsible for the cell block under the D.C. charter. City officials recently turned down a request from Marshal Herbert M. Rutherford III that the District take over supervision of juveniles held there, he said.

"There is a clear accountability in this thing, and it's the Marshal's Service," Downs said.

Findings by the federal inspector closely resemble allegations contained in a suit filed last month in U.S. District Court here on behalf of an 11-year-old Northwest Washington boy who was sexually assaulted by two older youths in a courthouse holding cell last year.

That and a another class action suit, filed against the Marshal's Service on behalf of all juveniles held in the cell block, maintain that youths are illegally incarcerated with adults in conditions that are "cruel, harsh, punitive and oppressive."

Daniel Arshack, an attorney who represents the Northwest boy, said he agreed with the findings in the Justice letter. But Arshack accused federal officials of "clearly passing the buck" on the question of who should take responsibility.

Wootton was unavailable for comment.

Rutherford acknowledged "discussing the possibility of the city checking over the juvenile operation," but he declined to discuss Wootton's letter or the inspection findings.

The lawsuits here stemmed from a May 1984 incident in which D.C. police arrested the youth, who said he "accidentally" hit a playmate in the head with a baseball bat. The boy was turned over to deputy marshals and placed in a cell in the courthouse basement, where he was attacked by two youths who twice forced him to commit sodomy.

Arshack has been joined in the class action suit by attorneys from the Youth Law Center in San Francisco, who have filed similar suits against several states. They and other advocates for juveniles maintain that the Justice Department has been lax in enforcing laws regulating the detention of youths.

A spokeswoman for Wootton's office said that problems in holding facilities "occasionally" are found in the 46 states that participate in the federal grant program, but that "most of the states are in complaince."

Spokeswoman Anne Voigt declined to elaborate on the findings here, saying, "We're not in the rating business. All we're looking at is whether a jurisdiction is within the mandates of our legislation."