BOSTON (AP) — A court ruling that forbids police officers in Massachusetts from holding a person based solely on a federal immigration detainer request is prompting calls for action from across the political spectrum on Beacon Hill.

A closer look at the ruling, which the American Civil Liberties Union said was the first of its kind in the U.S., and what might happen next:

___

THE CASE

The original case focused on Sreynuon Lunn, 32, who was born in a Thai refugee camp to Cambodian parents fleeing the Khmer Rouge and brought to the United States as a 7-month-old. He was legally allowed into the country as a refugee.

In October Lunn was arraigned on an unarmed robbery charge in Boston Municipal Court. At the time, the U.S. Department of Homeland Security issued a civil immigration detainer against him.

The state charge was dismissed on Feb. 6, but a judge refused to free Lunn and court officers kept him in a courthouse holding cell until an immigration officer took him into federal custody. His lawyers appealed, saying his detention based solely on the request by federal officials was unconstitutional. Lunn is no longer in federal custody.

___

THE RULING

On Monday, the state's highest court sided with Lunn's attorneys on the larger issue of whether Massachusetts police officers have the authority to detain someone suspected of being in the U.S. illegally if that person is not facing criminal charges.

"The question before us," the court wrote, "is whether Massachusetts court officers have the authority to arrest someone at the request of Federal immigration authorities, pursuant to a civil immigration detainer, solely because the Federal authorities believe the person is subject to civil removal."

The answer is "no" according to the court.

The justices said there's no state law allowing Massachusetts court officers "to arrest and hold an individual solely on the basis of a federal civil immigration detainer beyond the time that individual would otherwise be entitled to a release from state custody."

___

NEXT STEPS

The ruling has been hailed by organizations like the American Civil Liberties Union, who said a detention like Lunn's amounts to an unlawful arrest. Republicans and conservatives say the ruling makes it harder for police to work with federal immigration officials.

In response, a group of Republican lawmakers filed legislation that would give police officers broad power to arrest and hold an individual, without a warrant, if the officers have a lawfully-issued immigration detainer request from the U.S. Department of Homeland Security.

Republican Rep. Shaunna O'Connell, of Taunton, argued the legislation is needed to send a message that Massachusetts won't become "a safe haven for illegal immigrants."

___

BAKER BILL

Republican Gov. Charlie Baker is working on his own response.

On Thursday, Baker said he believes that when it comes to people who have committed violent crimes like rape or murder, police should be able to hold those individuals — possibly for 24 hours — so federal immigration authorities can pick them up.

Baker said he plans to file legislation as soon as this week that will give police in Massachusetts the ability "to hold violent, dangerous criminals for some period of time" if in fact federal officials believe they have immigration status issues.

In the meantime, Baker said, "we can still communicate with the feds, we can still tell them we have someone in custody who is very dangerous."

___

SAFE COMMUNITIES ACT

Supporters of the court decision are urging lawmakers to take a very different approach.

They want the Legislature to adopt the "Safe Communities Act," which would sharply limit cooperation between federal immigration officials and state and local law enforcement agencies.

Supporters say the bill would improve public safety by reassuring those in the state illegally that they can talk to local police.

ACLU of Massachusetts Director Carol Rose said the court ruling gives lawmakers an opportunity to pass the bill, which she said will "send a clear message that Massachusetts stands with our immigrant neighbors."

Baker opposes the bill.

___

Associated Press writer Bob Salsberg contributed to this report.