NEW YORK (AP) — A federal judge says he’ll order Palestinian activist Mahmoud Khalil released from immigration detention.

Judge Michael Farbiarz made the ruling from the bench in federal court in New Jersey on Friday. Lawyers for the Columbia graduate had asked a federal judge to immediately release him on bail from a Louisiana jail, or else transfer him to New Jersey, where he can be closer to his wife and newborn son.

The same judge had ruled earlier that the government can continue to detain the legal U.S. resident based on allegations that he lied on his green card application. Khalil disputes the accusations that he wasn’t forthcoming on the application. The judge previously determined that Khalil couldn’t continue being held based on the U.S. secretary of state’s determination that he could harm American foreign policy.