(CN) – Montana joined several other states Wednesday by making it clear that local law enforcement officials may not arrest and detain people under federal immigration detainers.

The Montana Supreme Court ruled unanimously Wednesday that the state had violated its own laws when a law enforcement officer in Lincoln County detained a man for possible immigration violations after his arrest on suspicion of burglary. Agustin Ramon, a French and Mexican national, had attempted to post his $25,000 bail but was denied based on a federal immigration detainer request. He was detained for 48 hours after his two-day incarceration, then spent the next two months in jail in Lincoln County.

Ramon filed a lawsuit against Lincoln County sheriff Darren Short, represented by the ACLU of Montana, the ACLU and Border Crossing law firm. While a state court judge sided with the county, Ramon eventually found success with the Montana Supreme Court.

According to Wednesday’s ruling, the refusal to release Ramon after his initial 48-hour detention amounted to another “arrest,” this one on federal immigration detainers – something that Montana law does not provide for.

Neither federal law nor Montana law gives law enforcement officers in the state the authority to arrest individuals based on federal civil immigration violations, Justice Mike McGrath wrote for the high court.

Ramon was held on a Department of Homeland Security I-247A immigration detainer – a written request to state or local officials to notify DHS as early as practicable before an alien is released from their custody and “maintain custody of the alien for a period not to exceed 48 hours beyond the time when he or she would otherwise have been released from their custody to allow DHS to assume custody.”

The Montana Supreme Court noted that these detainers are not judicial warrants and the continued detention sought by the Homeland Security is unlawful under Montana law.

Writing for the court, Justice McGrath said that the immigration detainer requests are “civil administrative warrants approved by, and directed to, federal immigration officials” and they do not require the authorization of a judge.

The Department of Homeland Security detainer requests are merely that – a request. Federal policy offers local law enforcement jurisdictions a choice: either assist in the implementation of federal immigration law or face sanctions for declining to participate.

McGrath said “such attempted coercion has been found unconstitutional” in two California counties.

The justices said that while the appeal was moot since Ramon had been released, they took up the case under the “public interest exception” in order to give direction to local law enforcement regarding future immigration detainers.

ACLU attorney Dan Galindo said Montana joins Minnesota, Massachusetts and New York, whose courts have concluded that “federal government cannot force local authorities to do their bidding.”

McGrath noted the 10th Amendment of the U.S. Constitution prohibits the federal government from compelling states to use their resources to administer and enforce federal immigration programs.

“This issue implicates both a fundamental constitutional right and concerns the legal power of a public official,” McGrath wrote. “Whether a state law enforcement officer can seize an individual and deprive that individual of his or her liberty based on a federal civil immigration detainer obviously presents a question of public importance that is relevant to both Montana law enforcement officers and residents.”

McGrath said it was important to take up the case, as “the issue is likely to recur,” he said. In the years 2017 through 2019, Montana saw a rise in detainers with a total of 190 – 35% of all detainers issued over the 15-year period since detainers first began in 2003.

“Moreover, the mere fact that appellees argue that their actions are lawful indicate that they plan to continue operating under the same terms leading to this very same issue recurring in the future and necessitating a judicial declaration as to its legality,” McGrath said. “As long as the current ad hoc-type agreement and policies between detention centers in Montana and DHS remains in place, the problems will repeat themselves.

“There is broad consensus around the nation that an immigration detainer constitutes a new arrest.”

Alex Rate, legal director for ACLU of Montana, praised the ruling.

“This is a major victory for immigrants in Montana,” Rate said. “Immigrants throughout Montana must be treated the same as every other individual who is charged with a crime. They will enjoy the presumption of innocence, have the right to post bail and be free pending trial, and step out from underneath the boot of over-aggressive federal immigration officials.”