BOSTON (Reuters) - A U.S. judge on Wednesday ordered the release of an illegal immigrant who is among 47 Indonesians in New Hampshire challenging the Trump administration’s order to deport them.

Slideshow ( 4 images )

The man, Terry Rombot, had been allowed to remain under the terms of a 2010 deal with U.S. Immigration and Customs Enforcement until this year, when President Donald Trump instructed ICE that all people living in the United States illegally were subject to deportation.

Rombot, part of a wave of Indonesian Christians who fled their country following deadly riots in 1998, learned of the policy change when he appeared for an Aug. 1 check-in with ICE and was arrested.

“He walks out of the courthouse right now,” Chief U.S. District Judge Patti Saris said after concluding that Rombot’s detention violated his rights.

He walked out of the U.S. District Court in Boston in his blue jail scrubs, without a chance to change into street clothes. Rombot’s lawyers said he was arrested despite a 2015 letter from ICE saying he would have a chance to prepare for an “orderly” departure.

The judge cited that letter during Wednesday’s hearing in holding that Rombot’s detention despite ICE’s previous guidance violated his due process rights under the U.S. Constitution.

“This is what intent was, that he would be given the opportunity to leave under his own steam and not under shackles,” she said.

Outside the courtroom, Rombot said: “I just want to say thank you to my attorney, my pastor and all of my friends.”

The U.S. Attorney’s office is considering an appeal, a spokeswoman said.

ICE officials said the arrangement had always been a temporary one and that the agency always had discretion to deport the people covered by the arrangement.

The Indonesians are part of an ethnic community of about 2,000 people clustered around the city of Dover in New Hampshire’s seacoast region.

Members of the group and advocates say they fear they could face discrimination or violence if forced to return to the world’s largest Muslim-majority country.

Their cause has drawn the support of Republican Governor Chris Sununu and New Hampshire’s all-Democratic congressional delegation, including U.S. Senator Jeanne Shaheen.

Saris previously ordered a stay to the deportations. She is currently weighing whether she can order a longer delay to give the affected people time to renew their efforts to gain legal status.