A federal magistrate judge Friday excluded the public from a forthcoming detention hearing for an Annandale man who has been held as a witness in an investigation of the radical Palestinian group Hamas.

U.S. Magistrate Judge Paul W. Grimm, granting a government request, found that considerations surrounding the detention of Ismael Selim Elbarasse were "inextricably intertwined" with evidence derived from a secret grand jury proceeding in Chicago, where Elbarasse is sought for questioning.

Grimm spoke of the "difficult overlap" of detention hearings, traditionally conducted openly, and grand jury proceedings, which are closed by law. "Trying to make the two fit is trying to put a square peg in a round hole," Grimm said.

Elbarasse's detention hearing, scheduled for Friday, did not go forward, as Grimm instead heard the government argue that the hearing should be closed and attorneys for two newspapers argue that it should not. Fran Kessler, a chief deputy clerk, later said only that the hearing had been postponed at the request of the parties.

Elbarasse, 57, was named as an unindicted co-conspirator by the grand jury in Chicago. Authorities say Elbarasse was an assistant to Mousa Mohammed Abu Marzook, one of three men charged in an indictment unsealed in Chicago last week.

The indictment charges Marzook, deputy chief of Hamas's political wing, with conspiring to raise millions of dollars for Hamas, which the U.S. government considers a terrorist group for carrying out bombings, kidnappings and other attacks in Israel.

Elbarasse was arrested last Friday on a material witness warrant from Chicago after police said they saw his wife videotaping the Chesapeake Bay Bridge. In court filings, the FBI alleged that the two may have been scouting a potential terrorist target -- an assertion that Elbarasse's family has disputed and that one of his attorneys has called "trash."

No charges were filed in connection with the videotaping, but Elbarasse was subsequently held as a material witness. Elbarasse's public defender took no position on whether the detention hearing should be closed.

Elbarasse, who appeared to scrawl on a legal pad before the proceeding began, did not speak.

Attorneys for The Washington Post and the Baltimore Sun argued that the public has a right to observe the proceeding and that jailing a person who has not been charged with a crime is a matter of great public interest.

"Someone could simply disappear," said Mary R. Craig, the Sun's attorney, "and there is no public explanation of what happened."

The Post's attorney, Daniel H. Rosenthal, said that the government's burden was to overcome "a long historical tradition of openness" and that Grimm's task was to evaluate merely whether Elbarasse is a flight risk.

After the terror attacks of 2001, the secrecy surrounding detentions under the material witness statute drew legal challenges and condemnation from some quarters. One federal judge, Gladys Kessler of the U.S. District Court for the District of Columbia, called the government's use of the material witness statute "deeply troubling" and questioned whether the witnesses were actually being held to testify before grand juries investigating terrorism, as the government has claimed.

Grimm's decision was consistent with rulings in other such cases, said Stephen A. Saltzburg, a professor at George Washington University Law School. "Judges are very unlikely in this day and age to second-guess" prosecution requests to close such hearings, said Saltzburg, a former official in the Justice Department.

Ismael Selim Elbarasse, 57, sits before U.S. Magistrate Judge Paul W. Grimm in Baltimore. Elbarasse was arrested Aug. 20 on a material witness warrant after police said they saw his wife videotaping the Chesapeake Bay Bridge.