Federal prosecutors have charged a Massachusetts judge who reportedly turned her own courtroom into a sanctuary jurisdiction with obstruction of justice.

As first reported by the Boston Herald on Thursday, the U.S. attorney for the District of Massachusetts announced federal obstruction of justice charges against Judge Shelley M. Richmond Joseph and court officer Wesley MacGregor, who are accused of helping an illegal immigrant evade immigration authorities in 2018.

According to court documents, local law enforcement arrested and charged an already twice-deported illegal alien on narcotics laws last spring. When Immigration and Customs Enforcement learned about the arrest, it issued a detainer for the immigrant, who was also previously barred from re-entering the U.S. until 2027.

When a plainclothes officer showed up to execute that warrant on the morning of April 2, 2018, prosecutors say, that's when Judge Joseph and Officer MacGregor got in the way.

"I'm not gonna allow [ICE] to come in here [the courtroom]," Judge Joseph told a court clerk on the date in question, according to the indictment.

MacGregor is accused of escorting the immigrant defendant out of the courtroom and using his security access card to open the exit so he could slip away later that afternoon.

"This case is about the rule of law," United States attorney Andrew E. Lelling said in a Department of Justice news release. "We cannot pick and choose the federal laws we follow, or use our personal views to justify violating the law."

The indictment also states that the courtroom recorder was turned off — against Massachusetts court rules — for 52 seconds while the judge discussed the matter with the illegal immigrant's lawyer.

Federal authorities are charging Joseph and MacGregor with three obstruction-related counts and have also charged MacGregor with one count of perjury for allegedly lying to a grand jury in relation to the matter.

"The people of this country deserve nothing less than to know that their appointed and elected representatives are working on their behalf, while adhering to and enforcing the rule of law, not a personal agenda," a statement from Homeland Security Investigations Special Agent in Charge Peter C. Fitzhugh said. "Any conduct which severs the underlying trust that the citizens of this Commonwealth place in those who hold positions of power and authority is a stain on all who swear an oath to protect and serve, with honor and integrity."