Lawyers for Palestinian Columbia University graduate Mahmoud Khalil wrote to a US district court on Monday asking for him to be immediately released on bail, or for him to be transferred to New Jersey.

The request came after Khalil, who helped lead pro-Palestinian campus protests at Columbia University last year, was close to being released from detention in Jena, Louisiana, where he has been held since March on allegations that he poses a threat to US foreign policy.

Monday's filing says that Khalil is neither a flight risk nor a danger to anyone and says that his detention - more than 1,300 miles from his family, friends, and legal team in New York - violates an Immigration and Customs Enforcement policy that says that detained parents should be held “as close as practicable” to their families.

The filing says that the court previously recognised that continued detention, based solely on the sorts of misrepresentations alleged by the government, is exceedingly rare and in retaliation for his advocacy on Palestine.

US district court judge Michael Farbiarz, who is overseeing his case, last week ruled it was unconstitutional to detain and deport Khalil, a lawful permanent resident, for supporting Palestinian human rights, and that he should be released from detention. The court gave the government until Friday morning to appeal.