Three men who authorities believe knew some of the suspects in the Sept. 11 terrorist attacks have been detained as material witnesses, a law enforcement official said Tuesday.

The men were arrested after authorities determined they knew two of the suspected hijackers and were unlikely to testify willingly before a grand jury, the official told The Associated Press, speaking on condition of anonymity.

The three could be sent to testify before a grand jury in New York, the official said.

At a court hearing Tuesday, a federal judge rejected a request to release the three men, said Randall Hamud, their attorney.

None of the men were charged with any crime, he said.

U.S. District Magistrate Judge Ruben B. Brooks said he closed the proceeding to the media and public to protect national security. He also ordered attorneys not to comment on the case.

The three men, all in their 20s, were identified as Mohdar Abdallah of Yemen and roommates Osama Awadallah of Jordan and Yazeed Al-Salmi of Saudi Arabia.

Before the judge's order not to talk, Hamud said his clients knew suspected hijacker Nawaq Alhamzi. He said his clients had cooperated with investigators.

After the hearing, he would not discuss how well they knew Alhamzi, but said: "When a government starts to emphasize basic guilt by association ... we have to all ask ourselves about where the law might be going in this country and where we, as a country, might be headed with respect to ourselves."

The three men lived in an apartment complex in the San Diego suburb of La Mesa with Omer Bakarbashat, who is being held in New York for questioning about Alhamzi and another suspected hijacker, Khalid Al-Midhar.

Awadallah and Al-Salmi are students at Grossmont College, according to a spokeswoman for the community college in La Mesa.

San Diego State University said it had matched Abdallah's address to that of a student whose name was spelled Mohdar Abdullah. It also said a student named Yazeed Saad Alsali, apparently an alternate spelling of Al-Salmi, had applied to enroll there in spring 2002.

In a statement, Awadallah's family expressed its support and desire to visit him. "It is his family's position that they will do whatever it takes to assist the authorities in their investigation," the statement said.

Awadallah's brother, Jamal, was at the court but declined to speak to reporters. He was summoned into the courtroom to testify.

A friend of Abdallah's, Muna Ismail, was also called in to testify. She told reporters there was no reason to explain why Abdallah was being detained.

Ismail said FBI agents surrounded Abdallah with their guns drawn when they arrested him Friday in a parking lot as he dropped her off at her job at an electronics store.

"They scared me," she said. She began crying and fainted in the parking lot and paramedics were called to assist her, she said. Since then, she has had trouble sleeping.

"I will never, ever, forget this day," she said. "How can they do like that?"