A federal appeals panel on Thursday reversed a lower court decision that released former Columbia University graduate student Mahmoud Khalil from an immigration jail, bringing the government one step closer to detaining and ultimately deporting the Palestinian activist.

A three-judge panel of the 3rd U.S. Circuit Court of Appeals in Philadelphia instructed the lower court to dismiss Khalil’s habeas petition, a court filing that secured his release. The panel ruled that the federal district court in New Jersey did not have jurisdiction over the matter because immigration challenges are handled differently under the law.

In a 2-1 decision, the panel ruled that federal immigration laws require deportation challenges to be made by filing a petition for review of a final order of removal with a federal appeals court — not a lower-level district court.

“That scheme ensures that petitioners get just one bite at the apple—not zero or two,” the panel wrote. “But it also means that some petitioners, like Khalil, will have to wait to seek relief for allegedly unlawful government conduct.”

The law bars Khalil from attacking his detention and removal in a habeas petition, the panel added.

The decision marked a major win for the Trump administration’s sweeping campaign to detain and deport noncitizens who joined protests against Israel.

Messages sent to Khalil and his legal team were not immediately returned, but the appeals court decision is likely not the final word in Khalil’s multipronged legal battle. Lawyers for the 30-year-old Palestinian activist have indicated that they will exhaust all appeal options.

Khalil was arrested at his apartment on March 8, 2025, and subsequently detained for three months in a Louisiana immigration jail, missing the birth of his first son. Federal officials charge him with leading activities “aligned to Hamas,” though evidence for this has not been publicly presented.

The government justified Khalil’s arrest under a seldom-utilized statute that permits expelling noncitizens whose beliefs are seen as threatening to U.S. foreign policy. In June, a federal judge in New Jersey ordered Khalil released, suggesting the government’s justification could be unconstitutional.

President Trump’s administration has contested this ruling, stating that final deportation decisions should be made by immigration judges rather than federal courts. Khalil has characterized the allegations against him as unjust and directly tied to exercising his free speech rights related to advocating for a free Palestine.

The decision comes as an appeals board in the immigration court system weighs an earlier ruling that indicated Khalil could be deported. His attorney argues that the federal order should take precedence. Potential deportation targets Algeria and Syria, where he faces grave risks due to his political activism.