PROSTITUTION and the District's social services bureaucracy are a pair that don't mix very well on a good day. But when the person selling herself on the street is only 12 years old and the agency taking her into custody is the city's juvenile detention facility, the linkage can be downright dangerous to an already at-risk child. Consider the case of the young girl picked up for prostitution close to dawn in the heart of downtown Washington one Saturday last month. Her ordeal in the city's care came close to matching her sad saga in the streets.

Charged as a fugitive from her guardian in New York City, the youth was taken to the D.C. Superior Court, where a judge, professing to be bound by law, turned her over to the Youth Services Administration, knowing full well that the minor would be placed in Oak Hill Youth Center, the city's facility for juvenile offenders in Laurel, pending a court hearing the following Monday. But wait a minute: Post writer Sewell Chan reports that, according to city policies and court orders, runaways and children detained awaiting trial aren't supposed to be housed with juvenile offenders committed to the city's custody. Besides, the only girls' space at Oak Hill lacks individual sleeping quarters. No matter. Judge Lee Satterfield, head of the Superior Court's family division, while acknowledging in an interview last night that youths awaiting court procedures must be segregated from adjudicated juvenile offenders and that no such facilities exists for girls at Oak Hill, said the court had no choice but to turn the child over to Youth Services until a court hearing could take place. So that's where the 12-year-old was sent. And that, unfortunately, is where she was sexually assaulted by two other residents on Sunday evening.

But the 12-year-old's nightmare odyssey through the D.C. bureaucracy was just beginning. The city decided the next day to drop the runaway charges, so it was farewell to the Youth Services Administration and hello to Child and Family Services, which sent her to Children's Hospital for a medical screening. But not so fast: A warrant for her arrest as a runaway arrived from New York, thanks to a report from the D.C. police. So the girl was taken away from Child and Family Services and hauled back before the Superior Court -- which promptly returned her to the Youth Services Administration, which in turn routed her back to Oak Hill, the scene of her sexual assault.

Who did what next has yet to be determined. But workers for Child and Family Services filed a neglect petition and got her back from Oak Hill -- in what condition is unknown. They placed her with a foster family until she was returned to New York eight days later. D.C. Department of Human Services spokeswoman Debra Daniels said yesterday that it has been established that room checks at Oak Hill were not appropriately documented on the night of the assault, but the investigation is continuing and disciplinary action may be taken. The Metropolitan Police Department reportedly is still investigating the sexual assault at Oak Hill. As usual, the bureaucracy -- court and social services alike -- is doing the requisite amount of finger-pointing and hopes the whole nasty thing will blow over. Until, of course, the next vulnerable child comes along.