By WILLIAM J. KOLE Associated Press

BOSTON (AP) – A federal appeals court on Tuesday overturned a ruling that barred immigration authorities from arresting people suspected of living in the U.S. illegally if they show up at Massachusetts courthouses.

The decision by the 1st U.S. Circuit Court of Appeals in Boston came in a case brought by prosecutors in two of the state’s largest counties. District attorneys and public defenders had argued that such arrests were disrupting the criminal justice system because defendants, witnesses and others were too afraid to come to court.

READ MORE: CDC Director Overrules Panel, Approves Pfizer COVID Booster Shots For Frontline Workers

It overturned a June 2019 ruling by U.S. District Judge Indira Talwani that barred U.S. Immigration and Customs Enforcement from arresting people for civil immigration violations as they are arriving at, leaving or inside a courthouse.

Courthouse arrests have angered lawyers, immigration advocates and even some judges, who want ICE to make courthouses “sensitive locations” generally free from immigration enforcement. While such arrests happened under President Barack Obama, lawyers say they’ve seen an uptick under President Donald Trump.

In its ruling, the 1st Circuit said those who contested the practice failed to show “that ICE lacks statutory authority to conduct such arrests in Massachusetts.”

Boston’s top prosecutor vowed to continue fighting the practice.

“This fight is far from over,” Suffolk County District Attorney Rachael Rollins said in a statement. “We are absolutely on the right side of justice here. It is never a loss when you are fighting for human rights, justice and building a safer community.”

READ MORE: Rhode Island Home That Inspired 'The Conjuring' Horror Film Is For Sale

Middlesex County District Attorney Marian Ryan also had challenged the government’s practice of arresting immigrants at courthouses.

The group Lawyers for Civil Rights said it, too, would fight to get the ban on such arrests reinstated “to protect the most vulnerable among us.”

“Courthouse immigration arrests impede justice by deterring witnesses and victims of crime from attending court. That harms all of us,” the organization said in a statement.

The 2019 challenge was filed days after federal prosecutors in Massachusetts charged a state court judge with helping a man who was living in the U.S. illegally to sneak out the back door of the courthouse to evade a waiting immigration agent.

The judge in that case still awaits trial.

MORE NEWS: Severe Thunderstorms Possible In Central, Eastern Massachusetts

(© Copyright 2020 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)