A federal judge agreed to provide classified statements from top al Qaeda detainees to the commission investigating the Sept. 11, 2001, terror attacks on the condition that they not be made public, but the information was released this week with great fanfare.

U.S. District Judge Leonie M. Brinkema, who is overseeing the criminal case against Zacarias Moussaoui in Alexandria, granted the request of federal prosecutors to provide the information to the commission only after it assured her that the material would stay classified, letters exchanged between the judge and prosecutors show.

"As long as the classified summaries remain out of the public's view, I have no objection,'' Brinkema wrote in an April 28 letter obtained by The Washington Post.

The commission subsequently asked that parts of the material be declassified, and Justice Department and intelligence officials agreed, people familiar with the process said. It is unclear whether the U.S. attorney's office in Alexandria, which is prosecuting the case and agreed to the judge's conditions, knew about the change. Brinkema, through a court spokesman, declined to comment. It is unclear whether she knew beforehand that the statements would be made public.

The release of the information could affect the already complicated case against Moussaoui, the only person charged in a U.S. courtroom in the attacks on the World Trade Center and Pentagon. Prosecutors had tried to keep the detainees' statements classified, denying defense requests for access to the captives. Those statements, the extent to which the defense can use them to help Moussaoui, and the issue of whether defense lawyers can question the detainees have kept the case tied up in court for more than a year. The statements were kept sealed throughout the legal fight, and court officials took great pains to redact any information from the statements from any public documents.

Some legal observers said Brinkema could now order a hearing and force prosecutors to explain how the material became public. "The judge is probably frustrated to no end that she let this stuff go through and is probably very upset about it,'' said William B. Cummings, a former U.S. attorney and longtime defense lawyer. He added that he did not think the disclosure would violate federal court rules because "the representations of the prosecutors was probably made in good faith, and somebody else has spun that around, and they have no control over that.''

The statements received widespread media attention this week because the two detainees gave striking and previously unheard details of the Sept. 11 plot.

Moussaoui's attorneys have blasted the disclosure, saying it imperiled Moussaoui's right to a fair trial. Sources close to the case said the publicly released information was incomplete and did not include statements saying Moussaoui was not part of the Sept. 11 plot. The commission's staff report quoted one top al Qaeda detainee, Ramzi Binalshibh, as saying that Moussaoui was directly involved in the Sept. 11 plot, while another, Khalid Sheik Mohammed, said Moussaoui was slated for a second wave of attacks on the West Coast.

Frank W. Dunham Jr., the federal public defender representing Moussaoui, declined to comment. A spokesman for the Justice Department referred questions to Paul J. McNulty, the U.S. attorney in Alexandria, who said, "We are confident that Zacarias Moussaoui can and will receive a fair trial.'' He declined to comment further.

Al Felzenberg, a spokesman for the Sept. 11 commission, said the commission had cleared the staff report "with intelligence officials to be certain that we didn't say anything that would inadvertently compromise sources and methods" of obtaining information. "We didn't release it of our own volition,'' he said.

The Justice Department has clashed with judges before in the case against Moussaoui, a French citizen who was indicted in December 2001. The issue of al Qaeda detainees became paramount in January 2003, when Brinkema ordered that defense lawyers be allowed to question Binalshibh, the self-described coordinator of the Sept. 11 plot. Defense lawyers believe he has information that could help their case.

Brinkema subsequently ordered similar depositions of Mohammed and a third detainee. Prosecutors defied the judge and refused to produce the witnesses, sending the case to a federal appeals court in Richmond, which recently ruled that defense lawyers could not question the detainees but could have access to their statements.

Prosecutors informed Brinkema in an April 27 letter that they intended to provide a copy of classified summaries of detainee statements to the commission, at its request. Prosecutors wrote that they believed that providing the summaries would not violate local court rules against disclosing information that could jeopardize a defendant's right to a fair trial because "they are classified and, therefore, cannot be released to the public.''

Brinkema responded in the April 28 letter and ordered prosecutors to "advise defense counsel immediately." Defense lawyers later said they did not object, as long as the material remained classified.

Stephen Saltzburg, a law professor at George Washington University and an expert on classified information, said that Brinkema probably will be upset and hold a hearing but that it will affect the case only "if it turns out that prosecutors were aware of what was happening on the declassification and didn't tell her.''

He added that although Moussaoui's attorneys will "yell and scream" about the disclosures, the information will help the defense, because the contradictory information about his role in the attacks will make it harder for prosecutors to secure a death sentence.