BOSTON (CBS/AP) — The highest court in Massachusetts has ruled that state court officers don’t have the authority to detain people suspected of being in the U.S. illegally if that person is not facing criminal charges.

The Supreme Judicial Court ruled that state and local police can’t cooperate when federal Immigration and Customs Enforcement authorities when they ask them to hold someone until they can arrive with a detainer.

The SJC ruling is the first statewide decision in the nation on the question of whether or not state and local officials have to or even can comply with orders from ICE to detain people.

The case the ruling related to, Sreynuon Lunn vs. Commonwealth, involved a man who was subjected to a deportation order to Cambodia.

Read the court’s decision in Sreynuon Lunn vs. Commonwealth

He was arrested for unarmed robbery. While the charges were later dropped, the feds asked local police to detain him so that ICE officers could pick him up and deport him.

The Massachusetts ACLU’s Laura Rotolo said, “An ICE detainer is just a request to hold a person. It’s not evidence of a crime. It’s not at all legally sufficient to deprive a person of their liberty.”

Attorney Emma Winger argued there’s no state law requiring them to cooperate.

“All the parties and all amicus agree that in order for state officials to detain based on an immigration detainer, it must be authorized under state law,” she said.

The SJC agreed. In their conclusion, they declared, “Massachusetts law provides no authority for Massachusetts court officers to arrest and hold an individual solely on the basis of a Federal civil immigration detainer, beyond the time that the individual would otherwise be entitled to be released from State custody.”

Chelsea Police Chief Brian Kyes explained, “If ICE has an actionable interest in the person and really want to take the person into federal custody, basically they’ll have to get to the police departments as quickly as possible to take custody of the individual, but it certainly takes the onerous off of the police.”

The ACLU celebrated the decision in a statement Monday morning.

“This court decision sets an important precedent that we are a country that upholds the Constitution and the rule of law,” the statement read. “This victory is the first of its kind in the nation. At a time when the Trump administration is pushing aggressive and discriminatory immigration enforcement policies, Massachusetts is leading nationwide efforts by limiting how state and local law enforcement assist with federal immigration enforcement.”

Massachusetts Attorney General Maura Healey also praised the SJC’s decision, saying it allowed law enforcement to “focus their resources on keeping people safe.”

“Today’s decision is a victory for the rule of law and smart immigration and criminal justice policies, and a rejection of anti-immigrant policies that have stoked fear in communities across the country,” she wrote in a statement. “As my office argued in this case, Massachusetts law protects our residents from illegal detention and prevents the federal government from forcing local law enforcement to make decisions contrary to the public safety interests of their communities.”

Other local leaders disagreed with the decision.

State Representative Jim Lyons said he would like to see all levels of government in sync over immigration rules.

“My concern is exactly that–public safety. If there are federal laws that are out there that are being broken, we should be able to use the authority in Massachusetts to protect the public,” Lyons said.

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

WBZ NewsRadio 1030’s Tina Gao reports