A U.S. District Court Judge found that President Donald Trumps former attorney, Alina Habba, has been illegally serving as the U.S. Attorney for the District of New Jersey since July.

Faced with the question of whether Ms. Habba is lawfully performing the functions and duties of the office of the United States Attorney for the District of New Jersey, I conclude that she is not, Chief U.S. District Judge Matthew Brann wrote in a ruling issued Thursday. Because she is not currently qualified to exercise the functions and duties of the office in an acting capacity, she must be disqualified from participating in any ongoing cases.

Habba was appointed to the role of New Jerseys top prosecutor on an interim basis in March. Her tenure was limited to 120 days by statute, after which point she would need Senate confirmation. That term ended in July. Attorney General Pam Bondi stepped in when judges in New Jersey appointed a replacement, firing the new U.S. attorney and reinstating Habba.

Several defendants in pending cases filed a challenge to Habbas tenure, saying she had no authority to prosecute them. Brann agreed, noting that the Trump administration could theoretically keep firing appointees and installing acting prosecutors for the length of the presidents term.

Taken to the extreme, the President could use this method to staff the United States Attorneys office with individuals of his personal choice for an entire term without seeking the Senates advice and consent, he wrote.

The ruling said that Habbas actions since the clock ran out on her interim posting can be declared void. However, Brann put his own order on hold in anticipation of an appeal from the Trump administration.

Alex Galbraith is Salon's nights and weekends editor, and author of our free daily newsletter, Crash Course. He is based in New Orleans.