SPOKANE, Wash. (AP) — A federal judge has ordered Yakima County to remove an "immigration hold" it placed on a criminal defendant after federal authorities designated him for deportation.

In a ruling Tuesday, U.S. District Judge Salvador Mendoza granted a temporary restraining order allowing the defendant, Antonio Sanchez-Ochoa, to be released from the Yakima County Jail on bail pending trial on an assault charge.

Documents filed in the case say Sanchez-Ochoa can post his $50,000 bail, but the jail refused to process it because a U.S. Department of Homeland Security officer signed an "administrative warrant" to detain him for immigration violations.

Northwest Immigrant Rights Project and Columbia Legal Services sued last week on his behalf, saying the administrative warrant was not reviewed by a judge, is not supported by probable cause and does not give local officials authority to continue detaining him.