A federal judge left his Detroit courtroom, traveled to CIA (search) headquarters and joined the Justice Department (search) in personally interviewing a witness whose testimony became key to the judge's decision to reverse convictions in the biggest terrorism trial since the Sept. 11 (search), 2001, attacks.

Government officials familiar with the interview told The Associated Press that the judge and Justice officials worked together outside the presence of defense lawyers because of concerns about protecting secret information under the Classified Information Procedures Act.

But legal experts said regardless of those concerns U.S. District Judge Gerald Rosen's actions were highly unusual and could provide grounds for lawyers to challenge his impartiality because he assumed the role of investigator in a case he continued to preside over.

"Based on those facts, is it proper? The answer is no," said Peter Henning, a law professor at Wayne State University who has followed closely the unraveling of the Detroit terror case. "A judge is not supposed to engage in investigation off the (official court) record and with people who are aligned with one of the parties."

Experts said CIPA doesn't exempt judges from ethics rules and the judge should have formally notified both sides and held a closed-door hearing for those with security clearances if he wanted to hear from the witness. The hearing should have been held at the courthouse.

"This would be a very unusual application of CIPA," said Michael Woods, the former chief of the FBI's national security law unit. "I have never experienced anything like it. It's not the way the act normally works."

Rosen flew to CIA headquarters in Northern Virginia last spring to review classified documents and joined Justice prosecutors in interviewing retired CIA officer William McNair. McNair then filed an affidavit in the case accusing prosecutors of ignoring his pretrial warnings that some of the evidence they used to convict an accused Detroit terror cell was flawed.

McNair's affidavit accused lead trial prosecutor Richard Convertino of "shopping for an opinion" and ignoring his warnings about a sketch found in the Detroit defendants' apartment that prosecutors portrayed as a key piece of evidence during the trial.

McNair said he repeatedly warned Convertino that CIA experts "did not believe the sketch conveyed any useful information" and was probably created by "someone who was not very well trained."

McNair's affidavit was cited by Justice in a dramatic report in August that admitted that prosecutors withheld or miscast evidence. And Rosen then cited Justice's admission as grounds for dismissing the convictions last month.

Judges are generally prohibited from having outside conversations about a case without notification of defense lawyers and prosecutors and a clear transcript. The purpose is for judges to avoid learning about information outside the official court record that nonetheless could influence their decisions.

"I think it is unprecedented," said Steven Lubet, a Northwestern University law professor. "A judge should not conduct ex parte interviews with witnesses or potential witnesses in a case before him."

Lubet said a judge can have limited contact with witnesses if he is involved in an investigation of court misconduct, but in the Detroit case the investigation Rosen assisted had a direct impact on the reversal of the case he was still presiding over.

"I probably would have told him to turn it over to the Justice Department. There is no reason the Justice Department couldn't have done that," Lubet said.

Rosen declined to be interviewed.

Just last month, a Virginia judge was forced to step aside in the trial of accused Washington sniper John Allen Muhammad because he left the bench to visit a jail where the defendant was staying. That visit prompted prosecutors to question the judge's impartiality.

Lawyers for some of the Detroit defendants said they were unaware of Rosen's role in the interview. James R. Gerometta, a federal defender, said he believes throughout the case there were activities defense lawyers weren't told about because of concerns about classified information.

The experts said defense lawyers likely wouldn't challenge Rosen's behavior because their clients' convictions were overturned.

But Convertino, the federal prosecutor singled out by Rosen for misconduct, plans to file a complaint, his lawyer said Wednesday.

"Aside from the impermissible ex parte nature of the contact, I was appalled to have learned of the actions undertaken by Judge Rosen," attorney William Sullivan said. "Far from being an impartial arbiter, he has vested himself in the role of active investigator, which is a breach of the judicial canon of ethics."

AP reported this summer that Rosen agreed to be interviewed by FBI agents conducting a criminal investigation of prosecutors in the case even though he was still presiding over it.

In his Sept. 1 ruling reversing the convictions of three Detroit men accused of operating a terror cell, Rosen made no mention of his role in interviewing McNair. Instead, he wrote only that he conducted a "personal review of all classified information in the possession of the Central Intelligence Agency concerning this case."

A U.S. official familiar with Rosen's meeting at the CIA, who spoke only on condition of anonymity because parts of Rosen's visit to CIA remain classified, said McNair had retired from CIA and "had agreed to cooperate with the judge."

"The CIA's role was only to ensure no classified material would make it into open court," the official said. A record of the interview was made, the official said.

The final report by Justice made no mention of Rosen's role in the McNair interview. It also omitted the fact that numerous top Justice officials, including anti-terrorism chief Barry Sabin, had intervened with the CIA before the 2003 trial to get an FBI agent to testify for the prosecution instead of McNair.