A Massachusetts judge accused of helping an illegal immigrant evade an Immigration and Customs Enforcement (ICE) officer reached an agreement with federal prosecutors more than three years after her indictment.

U.S. Attorney for the District of Rhode Island Zachary Cunha announced Thursday that Newton District Court Judge Shelley Joseph will refer herself to the Massachusetts Commission on Judicial Conduct for discipline rather than face federal prosecution.

"This case is about the conduct of a sitting state court judge, on the bench, in the course of her judicial duties. Its purpose has been to shed light on, and, as warranted, to secure accountability for that conduct," Cunha said in a statement. "After I was assigned to oversee this matter, I undertook a full and comprehensive review of the evidence, the applicable law, and relevant equitable and prudential factors. Having done so, I have concluded that the interests of justice are best served by review of this matter before the body that oversees the conduct of Massachusetts state court judges, rather than in a continued federal criminal prosecution."

Cunha added that, per the deal, Joseph will have to "make certain factual admissions" to the commission.

MASSACHUSETTS JUDGE WHO HELPED ILLEGAL IMMIGRANT ESCAPE ICE ARREST INDICTED, FEDERAL AUTHORITIES SAY

Judge Shelley Joseph

District Court Judge Shelley M. Richmond Joseph faces obstruction of justice charges for allegedly helping a man in the country illegally evade immigration officials as he left her Newton, Mass., courthouse after a hearing in 2018. (AP)

Joseph and court officer Wesley MacGregor were both indicted in April 2019 based on allegations that on April 2, 2018, they helped Jose Medina-Perez escape the courthouse through a back door while an ICE officer looked for him.

CLICK HERE TO GET THE FOX NEWS APP

MacGregor no longer works for the court system, and according to Cunha's office, he reached a deferred prosecution agreement where he will face one count of perjury while three counts — obstruction of justice, aiding and abetting; obstruction of a federal proceeding, aiding and abetting; and conspiracy to obstruct justice — will be dismissed.