BOSTON (AP) — The case against a Massachusetts state court judge accused of helping a man who was living in the U.S. illegally sneak out of the courthouse to evade an immigration enforcement agent can move toward trial, a federal judge ruled Monday.

U.S. District Judge Leo Sorokin rejected Newton District Court Judge Shelley Joseph’s bid to dismiss the obstruction of justice and conspiracy charges against her. No trial date has been set.

READ MORE: Facebook Changes Its Company Name To Meta

An attorney for Joseph, Thomas Hoopes, declined to comment.

Joseph and former court officer Wesley MacGregor were charged last year on accusations that they schemed to let the man escape after a hearing on charges that included drug possession. Sorokin also denied MacGregor’s motion to dismiss on Monday.

Authorities say an immigration agent was in the courtroom to detain the man when he appeared in the Newton courthouse in April 2018. The Dominican man had twice been deported and had been barred from entering the U.S. until 2027, prosecutors said.

Prosecutors say Joseph’s clerk asked the agent to leave the courtroom and told him that the suspect would be released into the courthouse lobby. Instead, after the hearing, MacGregor led the defendant downstairs to the lockup and let him out a rear door, prosecutors say.

READ MORE: 'Survivor 41' Episode 6: The Merge Part 1 

The man was caught by immigration officials about a month later.

Joseph’s lawyers have blasted prosecutors for what the defense has called an “extraordinary sweetheart deal granting complete immunity” to the immigrant’s defense attorney, who they say was the “architect and ringleader” of the man’s escape plan.

Judge Shelley Joseph outside federal court in Boston, April 25, 2019. (WBZ-TV)

Her lawyers say Joseph had no idea about the plan, but they argue that even if the allegations were true, judicial immunity shields judges from liability for acts acts “taken in their judicial role.” The defense has also slammed her prosecution as politically motivated and have accused federal authorities of trying to intimidate others into enforcing their immigration policies.

“The alleged actions of one state district court judge, in an unexceptional case in an ordinary courtroom, have become the vehicle through which the federal government seeks to threaten those in state government whom they view as insufficiently supportive of its immigration policies,” her attorneys said in a court filing this spring.

MORE NEWS: LIST: These Towns Are Still Mostly In The Dark From Nor'easter Power Outages

(© Copyright 2020 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)