A D.C. Superior Court judge in a secret hearing a week ago refused to order a 17-year-old held under preventive detention in a rape case despite the defendant's alleged admission to police that he had committed the attack and 16 other violet crimes, The Washington Post has learned.

In addition, D.C. Superior Court Judge Shellie Bowers ruled at the time that various procedures routinely followed by prosecutors in previous preventive detention cases were unconstitutional and could not be used in that case.

Yesterday, a second D.C. Superior Court judge -- David L. Norman -- followed portions of Bowers' secret ruling at a request of attorneys representing the same defendant, Marvin L. Edwards, in another sexual assault case. He ordered the public and press to leave the courtroom for portions of testimony in the case over the objections of federal prosecutors.

Before Norman closed the hearing, however, a D.C. police detective had publicly testifed that Edwards -- who reportedly has a lengthy juvenile criminal record but is charged as an adult in this case -- had admitted to him that he had broken into a woman's apartment in the 2100 block of F Street NW last November and raped her.

According to public and private sources, the 17 crimes in which Edwards has allegedly admitted his involvement occurred in the 2100 blocks of Northwest Washington streets from E Street north to P Street. For example, the rape case involved in last week's closed hearing before Bowers also occurred in the 2100 block of F Street NW, according to public arrest records.

The controversy over the preventive detention statute is centered over the type of evidence that the government can present against defendants in such a proceeding.

The Public Defender Service, which represents Edwards, contends that the proceedings should be closed because the evidence against Edwards being brought out in such a proceeding -- such as the statements he made and hearsay testimony about other crimes -- might not be admissible at a later trial.

The defense argued that if such evidence is made public, the disclosure might prevent Edwards from getting a fair trial in the future because prospective jurors may remember the details brought out in the preventive detention session.

The government, meanwhile, argued that the proceedings could be held in open court because jurors could be found who were unaware of news accounts that might follow.

The preventive detention statute has been used sparingly by the government here for the last 10 years since the controversial measure became law. It allows the government to hold a defendant without bond if the defendant is charged with a certain type of serious crime -- such as rape or murder -- and there is unusually strong evidence in the case that would likely lead to his conviction.

Preventive detention hearings have previously been open to the public. The one closed by Bowers last week was the first to be held behind closed doors, according to court officials. The closed hearing yesterday before Norman was the first here that was partially opened and partially closed.

Norman said he believed the right to open hearings belonged to the defendant in a case.

"I'm going to go along with that unless the government can show a compelling interest for it not be open," the judge said at one point yesterday before closing the hearing.

About 11 a.m. yesterday, Norman ruled that the complete preventive detention hearing would be closed. However, after an attorney from The Post joined with federal prosecutors in arguing that the hearing be open, Norman decided that some testimony in the hearing would be public and the rest would be secret.

Assistant U.S. Attorney Michael Paisano argued that the government had an interest in assuring the public that court proceedings were fair and proper and that "any closed hearing suggests that matters occurred against the public interest. Courts should be loathe to close proceedings."

By 5 p.m. yesterday afternoon, Norman began the closed portion of the proceeding. Public Defender Service attorney James McComas claimed that the government brought the new charge against Edwards solely because it lost the preventive detention argument before Bowers and was shopping for a more favorable judge.

Paisano denied that accusation and said the new charges were filed by the government because it was "motivated by its duty to safeguard the community" from Edwards.

Detective Kenneth Olaf then was called to testify in the hearing on the rape charge against Edwards. Norman denied several requests to close the hearing during Olaf's testimony until defense attorneys said they wanted to question the detective about other aspects of Edwards' statements to police.

Another Public Defender Service attorney said the presence of the public was "severely restricting" her cross-examination of the detective, so Norman said: "This phase of the public hearing has come to an end."

Spectators were told to leave the courtroom.

In addition to Olaf's testimony, it is understood that two other police officers were present to testify. They reportedly were prepared to testify that the victim in the case identified Edwards in a police lineup.

Defense attorneys also are claiming in the Edwards' cases that the defendant has a right at the preventive detention stage to confront the person who accused him of the crime. The government is contending that rulings allowing such confrontations -- reportedly made by Bowers in his secret hearing and alluded to by Norman yesterday -- are inconsistent with previous detention cases.

The government is appealing Bowers' decision to close the hearing last week as well as various decisions he made during the closed hearing itself.