PHOTO: From Twitter
Now playing
02:40
Judge accused of helping undocumented immigrant evade ICE
PHOTO: CNN
Now playing
01:35
See what security looks like outside US Capitol
PHOTO: Getty Images/CNN
Now playing
02:18
Bash: This is why key GOP senator is fighting Biden's stimulus
PHOTO: YouTube/Everyday Astronaut
Now playing
01:19
Watch SpaceX Mars prototype rocket nail landing, explode on pad
WASHINGTON, DC - JANUARY 16:  Physician to U.S. President Donald Trump Dr. Ronny Jackson listens during the daily White House press briefing at the James Brady Press Briefing Room of the White House January 16, 2018 in Washington, DC. Dr. Jackson discussed the details of President TrumpÕs physical check-up from last week.  (Photo by Alex Wong/Getty Images)
PHOTO: Alex Wong/Getty Images
WASHINGTON, DC - JANUARY 16: Physician to U.S. President Donald Trump Dr. Ronny Jackson listens during the daily White House press briefing at the James Brady Press Briefing Room of the White House January 16, 2018 in Washington, DC. Dr. Jackson discussed the details of President TrumpÕs physical check-up from last week. (Photo by Alex Wong/Getty Images)
Now playing
03:14
DOD releases scathing review of former White House physician
PHOTO: CNN/Getty
Now playing
02:10
'Highly misleading at best': Dale reacts to Pence's op-ed
PHOTO: Gov. Cuomo's office
Now playing
03:35
Gov. Andrew Cuomo addresses women's allegations
Commanding General District of Columbia National Guard Major General William J. Walker testifies before the Senate Homeland Security and Governmental Affairs/Rules and Administration hearing to examine the January 6, 2021 attack on the US Capitol on Capitol Hill on March 3, 2021 in Washington, DC. (Photo by Greg Nash / POOL / AFP) (Photo by GREG NASH/POOL/AFP via Getty Images)
PHOTO: GREG NASH/POOL/AFP via Getty Images
Commanding General District of Columbia National Guard Major General William J. Walker testifies before the Senate Homeland Security and Governmental Affairs/Rules and Administration hearing to examine the January 6, 2021 attack on the US Capitol on Capitol Hill on March 3, 2021 in Washington, DC. (Photo by Greg Nash / POOL / AFP) (Photo by GREG NASH/POOL/AFP via Getty Images)
Now playing
03:01
DC National Guard commander: 'Unusual' Pentagon restrictions slowed response to Capitol riot
Supporters of President Donald Trump hold up their phones with messages referring to the QAnon conspiracy theory at a campaign rally at Las Vegas Convention Center on February 21, 2020 in Las Vegas, Nevada.
PHOTO: Mario Tama/Getty Images
Supporters of President Donald Trump hold up their phones with messages referring to the QAnon conspiracy theory at a campaign rally at Las Vegas Convention Center on February 21, 2020 in Las Vegas, Nevada.
Now playing
03:00
Hear why QAnon supporters believe Trump will be president on March 4th
FBI Director Christopher Wray testifies before the Senate Judiciary Committee on the January 6th insurrection, in the Hart Senate Office Building on Capitol Hill in Washington, DC on March 2, 2021. (Photo by MANDEL NGAN / POOL / AFP) (Photo by MANDEL NGAN/POOL/AFP via Getty Images)
PHOTO: MANDEL NGAN/POOL/AFP via Getty Images
FBI Director Christopher Wray testifies before the Senate Judiciary Committee on the January 6th insurrection, in the Hart Senate Office Building on Capitol Hill in Washington, DC on March 2, 2021. (Photo by MANDEL NGAN / POOL / AFP) (Photo by MANDEL NGAN/POOL/AFP via Getty Images)
Now playing
02:55
Watch FBI director debunk conspiracy theories pushed by Trump supporters
WASHINGTON, DC - FEBRUARY 10: Neera Tanden, nominee for Director of the Office of Management and Budget (OMB), testifies at her confirmation hearing before the Senate Budget Committee on February 10, 2021 at the U.S. Capitol in Washington, DC. Tanden helped found the Center for American Progress, a policy research and advocacy organization and has held senior advisory positions in Democratic politics since the Clinton administration. (Photo by Anna Moneymaker-Pool/Getty Images)
PHOTO: Anna Moneymaker-Pool/Getty Images
WASHINGTON, DC - FEBRUARY 10: Neera Tanden, nominee for Director of the Office of Management and Budget (OMB), testifies at her confirmation hearing before the Senate Budget Committee on February 10, 2021 at the U.S. Capitol in Washington, DC. Tanden helped found the Center for American Progress, a policy research and advocacy organization and has held senior advisory positions in Democratic politics since the Clinton administration. (Photo by Anna Moneymaker-Pool/Getty Images)
Now playing
01:33
Neera Tanden releases statement on pulling her nomination
PHOTO: KCAL/KCBS
Now playing
01:41
Multiple people killed in crash after SUV and semitruck collide
nigeria kidnapped schoolgirls released Busari pkg intl ldn vpx_00000423.png
nigeria kidnapped schoolgirls released Busari pkg intl ldn vpx_00000423.png
Now playing
02:09
Tears of joy and relief as 279 Nigerian schoolgirls return home
New satellite images taken by Maxar show that North Korea sometime in the past year built a structure that may be intended to obscure entrances to an underground facility where nuclear weapons or nuclear weapons components are stored.
PHOTO: Courtesy Maxar
New satellite images taken by Maxar show that North Korea sometime in the past year built a structure that may be intended to obscure entrances to an underground facility where nuclear weapons or nuclear weapons components are stored.
Now playing
01:47
See images US intelligence claims is a secret weapons site
NEW YORK, NY - JULY 23: New York Gov. Andrew Cuomo speaks during the daily media briefing at the Office of the Governor of the State of New York on July 23, 2020 in New York City. The Governor said the state liquor authority has suspended 27 bar and restaurant alcohol licenses for violations of social distancing rules as public officials try to keep the coronavirus outbreak under control. (Photo by Jeenah Moon/Getty Images)
PHOTO: Jeenah Moon/Getty Images
NEW YORK, NY - JULY 23: New York Gov. Andrew Cuomo speaks during the daily media briefing at the Office of the Governor of the State of New York on July 23, 2020 in New York City. The Governor said the state liquor authority has suspended 27 bar and restaurant alcohol licenses for violations of social distancing rules as public officials try to keep the coronavirus outbreak under control. (Photo by Jeenah Moon/Getty Images)
Now playing
02:29
NYT: Third woman comes forward against Gov. Andrew Cuomo
PHOTO: Courtesy Penguin Random House
Now playing
01:00
These 6 Dr. Seuss books won't be published anymore
John King Magic Wall 0301
PHOTO: CNN
John King Magic Wall 0301
Now playing
03:00
US coronavirus numbers coming down, but not enough
(CNN) —  

A Massachusetts judge and a former court officer are accused of helping a twice-deported undocumented defendant elude immigration authorities by slipping out a rear courthouse door.

Newton District Court Judge Shelley Richmond Joseph, 51, and former trial court officer Wesley MacGregor, 56, were indicted Thursday on obstruction of justice and other federal charges.

They face counts of conspiracy to obstruct justice, obstruction of justice, obstruction of a federal proceeding, aiding and abetting, according to an indictment in US District Court in Boston. MacGregor was also charged with one count of perjury.

“This case is about the rule of law,” US Attorney Andrew Lelling said in a statement. “We cannot pick and choose the federal laws we follow, or use our personal views to justify violating the law.”

Joseph and MacGregor appeared in federal court Thursday afternoon. They were released without bond after pleading not guilty, CNN affiliate WCVB reported.

“This prosecution is totally political and Shelley Joseph is absolutely innocent,” Joseph’s attorney, Thomas Hoopes, told reporters outside court. MacGregor’s attorney was not immediately available.

She has been suspended without pay “until further order of this court,” according to the state’s Supreme Judicial Court.

Gov. Charlie Baker, a Republican, “believes no one should obstruct federal law enforcement officials trying to do their jobs and supports the Supreme Judicial Court’s decision to suspend Judge Joseph without pay,” his office said in a statement. His administration has filed legislation to allow court and law enforcement officials to work with immigration authorities “to detain dangerous individuals.”

“Everyone in the justice system – not just judges, but law enforcement officers, prosecutors and defense counsel – should be held to a higher standard,” Lelling said. “The people of Massachusetts expect that, just like they expect judges to be fair, impartial and to follow the law themselves.”

ACLU calls case ‘an assault on justice in Massachusetts courts’

Massachusetts Attorney General Maura Healey said the indictment was “a radical and politically motivated attack on our state and the independence of our courts” and that the matter could have been handled by the state Commission on Judicial Conduct and the Trial Court.

“It is 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,” she said in a statement.

Carol Rose, executive director of the ACLU of Massachusetts, called the case “preposterous, ironic, and deeply damaging to the rule of law” and said it had “everything to do with enforcing the president’s anti-immigrant agenda.”

“This prosecution is nothing less than an assault on justice in Massachusetts courts, and it will further undermine community trust and safety,” she said.

US Immigration and Customs Enforcement, in a 2017 report, listed Boston as a jurisdiction that limits cooperation with the agency.

ICE does not consider courthouses sensitive locations, the agency states on its website. Places where agents generally avoid making arrests include schools, hospitals, churches and ceremonies, the ICE guidelines state.

The subject of mounting ICE arrests at courthouses during the Trump administration has been particularly sensitive between major cities and federal officials. Local jurisdictions and attorneys have complained that arresting undocumented immigrants in courthouses has a chilling effect on their participation in prosecuting criminals as witnesses and reporting victims.

Defendant was led out a rear courthouse door as ICE officer waited outside courtroom

Federal prosecutors said the charges stemmed from an April 2, 2018, incident in which Richmond and MacGregor allegedly allowed an undocumented immigrant at a criminal court hearing to escape detention by an ICE officer.

Newton Police had arrested and charged the undocumented immigrant days earlier with being a fugitive from justice and drug possession, according to the indictment. Authorities later learned he had been deported from the US in 2003 and 2007 and was prohibited from re-entering the country until 2027. ICE issued an immigration detainer and warrant of removal.

A plainclothes ICE officer went to the Newton courthouse to execute the warrant.

At one point, the court clerk was directed by Joseph to ask the ICE officer to wait in the lobby, according to court documents.

When the case was called, a court audio recording captured Joseph, the defense attorney and the prosecutor speaking at sidebar about the ICE detainer.

The defendant’s attorney told Joseph he believed his client was not the same person named in the fugitive warrant.

“My client denies that it’s him,” the attorney said. “ICE is going to pick him up if he walks out the front door. But I think the best thing for us to do is to clear the fugitive issue, release him on a personal, and hope that he can avoid ICE. … That’s the best I can do.”

Joseph responded. “ICE is gonna get him? … What if we detain him?”

The judge then allegedly ordered the courtroom clerk to “go off the record for a moment.” The audio recorder was turned off for 52 seconds, the indictment said.

When the recorder was turned on again, the documents said, Joseph said she intended to release the defendant.

The prosecutor said, “Your Honor, with the information that I have I don’t think that there is enough tying him to the Pennsylvania warrant.”

The defense attorney asked to speak with the defendant downstairs.

“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 responded, “That’s fine. Of course,” according to prosecutors.

When reminded by the clerk that an ICE officer was in the courthouse, Joseph said, “That’s fine. I’m not gonna allow them to come in here. But he’s been released on this.”

MacGregor then allegedly escorted the defendant, his attorney and an interpreter downstairs to the lockup and used his security access card to open the rear exit and release the defendant, the indictment said.

The ICE officer, meanwhile, was waiting for the defendant in the lobby outside the courtroom – where the clerk told him the man would be released.

Indictment says Joseph made ‘false and misleading statements’ to judges looking into the matter

Joseph in April 2018 “made false and misleading statements” to other district court judges looking in the incident, according to the indictment. She allegedly told a senior district court judge that the courtroom recorder was shut off due to her “unfamiliarity with the Courtroom recording equipment.”

MacGregor allegedly told a federal grand jury in July that he did not know ICE agents were at the courthouse.

The indictment cited guidance issued in November 2017, by the Executive Office of the Massachusetts Trial Court, that said “DHS officials may enter a courthouse to perform their official duties.”

Joseph was appointed to the Massachusetts District Court bench in November 2017 after working as a Newton-based criminal defense attorney and lecturing at law schools, prosecutors said.

MacGregor was a Massachusetts trial court officer since 1993. He was assigned to the Newton courthouse in 2016.

“Everyone in the justice system – not just judges, but law enforcement officers, prosecutors, and defense counsel – should be held to a higher standard,” Lelling said. “The people of Massachusetts expect that, just like they expect judges to be fair, impartial and to follow the law themselves.”

CNN’s Eric Levenson and Sonia Moghe contributed to this report.