DARTMOUTH — Bristol County Sheriff Thomas Hodgson is not holding back comments regarding a lawsuit filed by two Massachusetts District Attorneys on Monday that seeks to block immigration arrests within state courthouses.

"Shame on the elected officials and pro-illegal advocates for filing this frivolous lawsuit, which seeks to make it more difficult for federal law enforcement officers to apprehend criminal illegal aliens," Sheriff Hodgson wrote in a written statement on Monday.

The lawsuit, filed Monday morning by Middlesex District Attorney Marian Ryan and Suffolk District Attorney Rachael Rollins, challenges the authority of Immigration and Customs Enforcement officers to arrest people within courthouses on civil immigration matters.

A statement from the Middlesex District Attorney's Office says because of ICE's policy "Prosecutors are forced to abandon cases because many victims and witnesses are deterred from appearing in court."

The lawsuit was filed days after a Massachusetts judge and a court officer were indicted on charges that they helped an illegal immigrant flee from a courthouse while an ICE agent was inside waiting to arrest him.

Hodgson said the lawsuit undermines the laws of the United States and puts law-abiding citizens at risk.

"As elected officials sworn to protect the people who put them in office, or as U.S. citizens who want their neighborhoods and families to be more safe, these District Attorneys and advocates should be working with law enforcement instead of partnering with criminal illegal immigrants," said Hodgson.

"I don't see these DAs or advocates filing bills and lawsuits to keep U.S. citizens and legal immigrants shielded from law enforcement in a courtroom," said the Sheriff.