DENVER (AP) — A Colorado judge is barring a sheriff’s department from continuing to jail people suspected of being in the country illegally on behalf of federal authorities, saying that the practice violates their constitutional rights. District Court Judge Eric Bentley ruled late Thursday that El Paso County Sheriff Bill Elder has no authority to hold people once they have posted bond, completed a sentence or otherwise resolved their state case.

El Paso County Sheriff Bill Elder (credit: CBS)

The Colorado American Civil Liberties Union filed the suit in February on behalf of two men and all future jail inmates, arguing that the sheriff’s agreement to house people on behalf of Immigrations and Customs Enforcement did not make the practice legal.“The court ruled that when individuals have posted bond or resolved their criminal case, sheriffs have a clear legal duty to release them,” said ACLU of Colorado Legal Director Mark Silverstein.

READ MORE: 'Going To Take Some Time': Community Gathers To Remember Victims, Heal Together After Olde Town Arvada Shooting

“Beyond finding that holding individuals for ICE is unconstitutional, the court also noted a complete lack of evidence to support Sheriff Elder’s claim that the practice promotes public safety,” said ACLU Staff Attorney Arash Jahanian. “The court cited a declaration by the Colorado legislature that public trust is undermined when local law enforcement agencies participate in federal immigration enforcement. Members of the community do not report crimes when they fear it will lead to detention and deportation rather than protection. Local law enforcement’s participation in ICE’s deportation scheme harms, not promotes, public safety.”

READ MORE: Water Quality Control Commission Votes Down Proposal To Allow More Pollution In Colorado Waterways

A spokeswoman said Friday that Elder plans to appeal the ruling.

A similar lawsuit is pending against the sheriff in Teller County.

MORE NEWS: Colorado Woman Cassondra Stratton Missing After Miami Condo Collapse

(© Copyright 2018 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)