A Massachusetts judge has been charged with obstruction of justice after allegedly attempting to prevent an Immigration and Customs Enforcement (ICE) officer from taking custody of an immigrant.

Judge Shelley M. Richmond Joseph and trial court officer Wesley MacGregor were charged with conspiracy to obstruct justice, obstruction of justice and obstruction of a federal proceeding. It also accuses MacGregor of perjury.

The grand jury indictment alleges that they conspired to prevent an ICE officer from taking custody of a person identified in court documents as A.S., or alien subject, at the Newton District Courthouse in Massachusetts on April 2.

#BREAKING: USA #Lelling to announce federal indictment charging Massachusetts Trial Court Judge & Court Officer with obstruction of justice during 12:45 pm press conference — U.S. Attorney MA (@DMAnews1) April 25, 2019

ADVERTISEMENT The immigrant had previously been deported from the U.S. and not permitted to return until 2027, according to the court filing. After ICE learned of the individual's arrest narcotics and fugitive from justice charges, the agency issued a detainer on him, authorities said in court.

The day of the proceeding, ICE sent a "plainclothes" officer to take the individual into custody, who waited in the lobby for the proceedings to finish, the filing said.

The filing, citing court records, said that Joseph and the defense attorney representing the immigrant discussed the possibility of ICE picking him up. Following the proceeding, Joseph allegedly permitted the defense attorney to go speak with him and an interpreter in a lockup area in the courthouse.

MacGregor then allegedly used his access card to open an exit, allowing the individual to be released while the ICE officer remained in the courthouse lobby.

A federal prosecutor said in a statement that judges cannot allow personal beliefs to interfere with their jobs.