A federal appeals court reversed a lower-court decision that had freed former Columbia University graduate student Mahmoud Khalil from an immigration jail, moving the Trump administration closer to detaining and ultimately deporting him, according to the ruling issued Thursday by the 3rd U.S. Circuit Court of Appeals.

In a 2-1 decision, the three-judge panel did not resolve the key constitutional question in Khalil’s case—whether the administration’s effort to remove him over his campus activism and criticism of Israel is unconstitutional. Instead, the panel ruled that a federal judge in New Jersey did not have jurisdiction to decide the case at this stage.

The appeals judges said federal law requires Khalil’s challenge to fully run its course through the immigration courts before he can raise it in federal court. They wrote that the process “ensures that petitioners get just one bite at the apple — not zero or two,” adding that it also means “some petitioners, like Khalil, will have to wait to seek relief for allegedly unlawful government conduct.”

The decision came as the administration continues a broader campaign to detain and deport noncitizens who joined protests against Israel. Tricia McLaughlin, a spokesperson for the Department of Homeland Security, called the court ruling “a vindication of the rule of law,” and said the department would “work to enforce his lawful removal order,” encouraging Khalil to “self-deport now before he is arrested, deported, and never given a chance to return.”

It was not immediately clear whether the government would seek to detain Khalil again while his legal challenges continue, the report said. Khalil, a legal permanent resident, remains able to seek further review, and his lawyers argued that the appeals process was not meant to prevent relief altogether.

In a statement distributed by the American Civil Liberties Union, Khalil called the decision “deeply disappointing.” He said, “The door may have been opened for potential re-detainment down the line, but it has not closed our commitment to Palestine and to justice and accountability,” and added that he would “continue to fight, through every legal avenue and with every ounce of determination, until my rights, and the rights of others like me, are fully protected.”

Baher Azmy, one of Khalil’s lawyers with the Center for Constitutional Rights, said the ruling was “contrary to rulings of other federal courts,” adding that their “legal options are by no means concluded” and that they will “fight with every available avenue.” The ACLU said the administration cannot lawfully re-detain Khalil until the order takes formal effect, which it said will not happen while he can still immediately appeal.

Khalil’s situation stems from an arrest last March and subsequent detention in a Louisiana immigration jail for three months, during which he missed the birth of his first child. Federal officials accused Khalil, 31, of activities they described as “aligned to Hamas,” while also not presenting evidence for the accusation and not charging him with criminal conduct. Officials also accused him of failing to disclose information on his green card application.

The government relied on a seldom-used statute that allows for the expulsion of noncitizens whose beliefs are deemed to pose a threat to U.S. foreign policy interests. In June, a federal judge in New Jersey ruled that the government’s justification would likely be declared unconstitutional and ordered Khalil released, according to the report. The Trump administration appealed, arguing the deportation decision should be handled by an immigration judge rather than by a federal court.

Khalil has dismissed the allegations as “baseless and ridiculous,” and he has said the arrest and detention were “a direct consequence of exercising my right to free speech as I advocated for a free Palestine and an end to the genocide in Gaza.” New York City Mayor Zohran Mamdani also weighed in on social media Thursday, writing on X that Khalil’s arrest was “more than just a chilling act of political repression,” and adding, “Mahmoud is free — and must remain free.”

Judge Arianna Freeman dissented on Thursday, writing that the majority held Khalil to the wrong legal standard and describing his arguments as “now-or-never claims” that could be addressed at the district court level even though the immigration case is not complete. The report said the two judges who voted against Khalil—Thomas Hardiman and Stephanos Bibas—were Republican appointees, while Freeman was appointed by President Joe Biden.

The majority rejected Freeman’s concern that the ruling would leave Khalil with no remedy for unconstitutional immigration detention even if he can later appeal, saying the legal system “routinely forces petitioners — even those with meritorious claims — to wait to raise their arguments.”

The decision also comes while an immigration appeals board weighs whether Khalil can be deported to Algeria, where he maintains citizenship through a distant relative, or to Syria, where he was born in a refugee camp to a Palestinian family. His attorneys have said he faces mortal danger if forced to return to either country.