*Update: This story has been updated to clarify that Joseph is a judge on the Massachusetts District Court.

A Massachusetts state judge and trial court officer were indicted today in federal court for their alleged involvement in preventing a U.S. Immigration and Customs Enforcement officer from taking custody of a fugitive alien charged with narcotics possession.

Massachusetts District Court Judge Shelley M. Richmond Joseph, 51, who has been on the bench for a year and a half, and Wesley MacGregor, 56, a former court officer, each were indicted on one count of conspiracy to obstruct justice and two counts of aiding and abetting obstruction of justice, the U.S. Attorney's Office in Boston announced.

MacGregor was also charged with one count of perjury, U.S. Attorney Andrew E. Lelling said in a release.

Prosecutors allege that Joseph helped the defendant, who was twice deported from the U.S., evade ICE custody by having MacGregor escort him and his attorney through the back door of the courthouse while the ICE officer waited in the lobby.

Joseph's attorney, Douglas S. Brooks of LibbyHoopes did not immediately respond to a request for comment.

Defense counsel information for MacGregor was not immediately available.

In a statement, Lelling said the case boiled down to upholding the rule of law.

“The allegations in today's indictment involve obstruction by a sitting judge, that is intentional interference with the enforcement of federal law, and that is a crime,” Lelling said. “We cannot pick and choose the federal laws we follow, or use our personal views to justify violating the law. Everyone in the justice system—not just judges, but law enforcement officers, prosecutors and defense counsel—should be held to a higher standard. The people of Massachusetts expect that, just like they expect judges to be fair, impartial and to follow the law themselves.”

Todd M. Lyons, acting field office director of ICE's Enforcement and Removal Operations in Boston, suggested in a statement that Joseph's actions were politically motivated.

“The actions of the judge in this incident are a detriment to the rule of law and highly offensive to the law enforcement officers of ICE who swear an oath to uphold our nation's immigration laws,” Lyons said. “In order for our criminal justice system to work fairly for all people, it must be protected against judicial officials who would seek to replace the implementation of our laws with their own ideological views or politically driven agenda.”

If convicted on the most serious charges, Joseph and McGregor each face maximum sentences of up to 25 years in prison and fines of up to $250,000, according to the release.