BOSTON (WHDH) - A Massachusetts top court was the first in the nation to rule that state law enforcement cannot hold illegal immigrants just to buy time for federal authorities to take them into custody.

In a statement the state ACLU said, “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. Now more than ever, we need to send a clear message that Massachusetts stands with our immigrant neighbors.”

At times, federal Immigration and Customs Enforcement agents would ask local courts or police to detain an illegal immigrant who would otherwise be released.

A field office director with ICE in Boston said, “While ICE is currently reviewing this decision to determine next steps, this ruling weakens local law enforcement agencies’ ability to protect their communities. The dedicated men and women of ICE will continue to do our sworn duty to enforce our immigration laws and protect the safety and security of the citizens of Massachusetts’ communities.”

This all comes after a civil case by an immigrant said a court officer in Boston illegally detained him for federal ICE agents.

The man was arrested for a robbery in Boston, but the case was dropped. He was held on an ICE detainer even though normally he would have been let go.

In the midst of the Trump administration promising tougher restrictions on immigration, this is a heated debate that is certain to continue.

(Copyright (c) 2020 Sunbeam Television. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)