The Billings Gazette reports that a local immigrant rights group claimed on Monday that a Montana judge acted illegally when he asked a deputy to take away from his court a Mexican-born man who was later detained by federal immigration authorities.

40-year-old Miguel Reynaga Hernandez, a construction worker living in Billings, was detained in October after appearing in court with his wife, who was seeking a civil protection order against another person.

The Northwest Immigrant Rights Project contends that former Yellowstone County Justice of the Peace Pedro Hernandez had no authority to initiate Reynaga’s arrest. The group filed suit on Friday against the judge– along with Yellowstone County sheriff’s deputy Derek Skinner– on Reynaga’s behalf in federal court.

Local law enforcement agencies have reportedly turned over suspects to federal immigration officials, which President Donald Trump has vocally encouraged.