By Sabrina Souza, CNN

(CNN) — A federal judge granted Mahmoud Khalil’s habeas corpus petition and barred the Trump administration from continuing to seek his detention, according to a court order.

New Jersey District Judge Michael E. Farbiarz ordered a stay of the preliminary injunction until Friday at 9:30 a.m., which allows the government to seek an appellate review if it chooses to do so, he wrote.

“The lawful permanent resident filed a habeas corpus petition and has moved to preliminarily enjoin federal officials from removing him from the United States based on the Secretary’s determination. The motion is granted,” Farbiarz wrote.

Khalil, the Columbia University graduate at the center of a high-profile deportation fight with the US government over his pro-Palestinian views, personally responded to the government’s claims that he’s a threat to foreign policy for the first time in a sworn legal declaration unsealed last week.

His wife, Noor Abdalla, said in a statement that Khalil should be released immediately to his home in New York to be with family.

“This is the news we’ve been waiting over three months for. Mahmoud must be released immediately and safely returned home to New York to be with me and our newborn baby, Deen,” Abdalla said. “True justice would mean Mahmoud was never taken away from us in the first place, that no Palestinian father, from New York to Gaza, would have to endure the painful separation of prison walls like Mahmoud has.”

?Khalil was among the first in a series of high-profile arrests of pro-Palestinian students as the Trump administration moved to crack down on antisemitism on college campuses. While the White House has backed off the cancellation of hundreds of student visas, Khalil missed the birth of his first son and his Columbia graduation due to his detainment.

While a graduate student at Columbia, Khalil, a Palestinian refugee, acted as a liaison between student protesters and school administrators during the pro-Palestinian demonstrations on campus in 2024.

“Today’s ruling is a huge win for the Constitution and the rights of citizens and non-citizens alike,” Brett Max Kaufman, senior counsel in the ACLU’s Center for Democracy, said in a statement. “No one should be imprisoned or deported for their political beliefs, and the three months that Mahmoud has spent in detention are an affront to the freedoms that this country is supposed to stand for.”

The Trump administration has argued Khalil’s actions pose a threat to its foreign policy goal of combatting antisemitism and in April, the administration outlined its evidence against him in a two-page memo written by Secretary of State Marco Rubio.

Amy Greer, Khalil’s attorney, called the judge’s order a “first step to justice.”

“Today, the judge found what we already knew — the Rubio determination is unconstitutional. The U.S. government cannot detain people for their protected political advocacy. Today was the first step to justice, but we will not stop fighting until Mahmoud is home with his wife and child,” Greer said in a statement.

Khalil’s detention has sparked protests across the country from supporters who believe his detention is a flagrant violation of core American values, including the protection of free speech.

This story has been updated with additional details.

The-CNN-Wire
™ & © 2025 Cable News Network, Inc., a Warner Bros. Discovery Company. All rights reserved.

CNN’s Chelsea Bailey and Danya Gainor contributed to this report.