The Trump administration, blocked by a judge from detaining Mahmoud Khalil on one set of legal grounds, has officially shifted to another as it fights to hold him in federal custody.

Justice Department lawyers told the judge, Michael E. Farbiarz, on Friday, that Khalil was being held on allegations that had been added to his case more than a week after his arrest in March. Farbiarz has already suggested the allegations do not wholly explain his continued detention.

Khalil, a Columbia University graduate and legal permanent resident of the United States, was a leader of pro-Palestinian demonstrations on the school’s campus. Although he has not been accused of a crime, he was arrested in March and transferred to Louisiana, where he has been held in a federal detention center for more than three months.

Shortly after Khalil was taken into custody, Secretary of State Marco Rubio justified his detention by invoking a rarely cited law. He declared the Columbia graduate’s presence in the United States a threat to the government’s foreign policy goal of preventing antisemitism.

Khalil’s lawyers have countered that argument by citing their client’s comments on CNN that “antisemitism and any form of racism has no place on campus and in this movement.”

Farbiarz, of U.S. District Court in New Jersey, found that the law Rubio invoked was most likely unconstitutional, and he ruled Wednesday that the government could no longer detain Khalil under that justification.