BOISE, Idaho (AP) — A federal judge has ordered the release of 16 people detained by immigration officials during an FBI-led raid at a rural Idaho racetrack last month.

U.S. District Judge B. Lynn Winmill ruled Wednesday that keeping the migrants jailed without bond violated their due process rights, allowing them to be released as they await the resolution of their immigration cases. Many detainees have lived in the U.S. for decades and possess no criminal records, with some being married to U.S. citizens or having U.S. citizen children.

The Department of Homeland Security acknowledged that Immigration and Customs Enforcement agents conducted lawful arrests, but criticized the ruling as favoring 'lawbreakers.'

During the Oct. 19 raid, which included over 200 officers from 14 agencies, around 400 individuals were detained for hours, raising concerns about the treatment of families. Witnesses reported aggressive tactics, including children being zip-tied or separated from their parents.

Although the raid aimed to address issues related to illegal gambling, it instead resulted in 105 arrests on immigration violations. The fallout of the raid revealed that many detainees signed voluntary agreements for departure even before consulting legal representation.

Judge Winmill emphasized in his ruling that non-citizens residing in the U.S. are entitled to essential due process rights.

Attorney Nikki Ramirez-Smith remarked that the ruling provides clarity on immigration issues, suggesting affected families will now be able to stay together while filing for relief in court, albeit amid a significant backlog in immigration cases.

This ruling could have notable implications as tensions continue over the approaches taken towards immigration enforcement and the treatment of migrants within the legal system.