Massachusetts Attorney General Maura Healey (D) was among those who condemned the charges, criticizing what she said was a “radical and politically motivated attack on our state and the independence of our courts.” The charges violate “a bedrock principle of our constitutional system that federal prosecutors should not recklessly interfere with the operation of state courts and their administration of justice,” Healey said in a statement.

The charges, brought by a U.S. attorney appointed by President Donald Trump, show the Trump administration’s continued war with local and state officials who resist the federal immigration crackdown .

Massachusetts District Judge Shelley Richmond Joseph allowed the unnamed immigrant to sneak out the Newton District Courthouse back door after she learned a plainclothes ICE agent was in the courthouse to arrest him, according to an indictment . Court officer Wesley MacGregor, who was accused of leading the man to the back door, also was charged with obstructing justice and with lying to a grand jury about whether he knew the ICE agent was there.

A Massachusetts judge was charged with obstruction of justice Thursday by federal prosecutors, who alleged she helped an undocumented immigrant escape an Immigration and Customs Enforcement agent during a court hearing a year ago.

ASSOCIATED PRESS District Judge Shelley M. Richmond Joseph departs federal court, Thursday, April 25, 2019, in Boston after facing obstruction of justice charges for allegedly helping an undocumented immigrant evade immigration officials.

According to the indictment, the immigrant appeared in Joseph’s courtroom in April 2018 on charges of being a fugitive from Pennsylvania and narcotics possession.

“So, it’s my understanding that ICE is here,” Joseph said during the hearing, according to the indictment.

“ICE is going to pick him up if he walks out the front door,” the man’s attorney said, proposing that the judge drop the fugitive charge and detain him on the drug charge.

“ICE is gonna get him?” Joseph asked the attorney.

“Yeah,” the defense lawyer replied.

Joseph then asked a clerk to shut off the court recorder, violating state rules requiring all court proceedings to be recorded, according to the indictment. When the recording resumed, the defense attorney asked to speak to his client downstairs in the courthouse lockup.

“I would ask that he — I believe he has some property downstairs,” the attorney said. “I’d like to speak with him downstairs with the interpreter, if I may.”

Joseph agreed to the request and said she would release the man after he was taken to the lockup.

After the hearing, MacGregor led the immigrant, the defense attorney and an interpreter downstairs and opened the courthouse back door, allowing the man to escape, the indictment said.

Joseph and MacGregor both pleaded not guilty to the charges Thursday in Boston, according to news reports.

Joseph’s lawyer said that the charges were “absolutely political.”

The ACLU of Massachusetts condemned the charges as “preposterous, ironic, and deeply damaging to the rule of law.”

“In contrast to Attorney General William Barr’s famously narrow view of what constitutes obstruction of justice — at least when it comes to President Trump— the Department of Justice has now charged a state judge and court security officer based on a theory of obstruction that is shockingly aggressive,” the organization’s executive director, Carol Rose, said in a statement. “This decision seems to have little to do with the actual facts, and everything to do with enforcing the president’s anti-immigrant agenda.”