June 20 (UPI) -- Former Columbia University student Mahmoud Khalil on Friday night was freed from federal detention in central Louisiana after a federal judge ordered his release.

In Newark, N.J., U.S. District Judge Michael Farbiarz said that prosecutors didn't provide a legitimate justification for 104 days of detention since March 8 by Immigration and Customs Enforcement. The Syrian national organized campus protests favoring Hamas while enrolled at Columbia University in New York City, which runs counter to U.S. foreign policy.

Farbiarz, who was appointed by President Joe Biden, said it was "highly, highly unusual" the government still wanted him detained.

"Together, they suggest that there is at least something to the underlying claim that there is an effort to use the immigration charge here to punish the petitioner - and, of course, that would be unconstitutional," the judge said.

He was ordered to surrender his passport and travel documents, and restricted to four states and Washington, D.C.