A judge on Thursday ordered ICE to let the Maryland man go immediately, writing that federal authorities had detained him again after his return to the United States without any legal basis.