President Donald Trump's pick to lead the federal prosecutor's office in New Jersey, Alina Habba, has been serving unlawfully for nearly two months, a judge ruled on Aug. 21.

Trump selected Habba, his former personal lawyer, as the interim U.S. attorney for New Jersey in March. But keeping Habba in that role has proven a challenging task.

On July 22, a panel of judges declined to appoint Habba to the role. Attorney General Pam Bondi responded by removing the official who was set to replace Habba.

"This Department of Justice does not tolerate rogue judges – especially when they threaten the President’s core Article II powers," Bondi wrote in a July 22 post on X. Article II of the Constitution spells out the powers of the presidency.

Federal Judge Matthew W. Brann's Aug. 21 ruling that Habba's interim appointment ended on July 1 escalates the administration's battle with the judiciary. Brann wrote that courts can declare Habba's actions since July 1 void.

"And 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," Brann added.

Brann was asked to weigh in on the issue after multiple criminal defendants challenged Habba's role in their cases. The judge said Habba can't participate in or supervise these defendants' prosecutions, and that her past actions in their cases – such as signing an indictment – were void. However, he declined to dismiss the cases themselves.

Lawyers for one of the defendants, Cesar Pina, argued the decision underscores that the Trump administration can't circumvent the law when it comes to confirming U.S. attorney appointments.

"Prosecutors wield enormous power, and with that comes the responsibility to ensure they are qualified and properly appointed," the two lawyers, Abbe David Lowell and Gerald Krovatin, said.

The Justice Department, which includes the New Jersey U.S. attorney's office, didn't immediately respond to a request for comment.

Brann is the chief federal judge for a trial court in Pennsylvania. However, he was assigned to handle cases challenging Habba's ongoing role in New Jersey federal prosecutions by the court that deals with federal appeals for both Pennsylvania and New Jersey.

Brann halted his own ruling from going into effect until after the Trump administration had a chance to appeal and see what the higher courts say.

Before March, Habba had never worked as a prosecutor. She represented Trump in multiple civil cases in recent years when he was out of office.

This article originally appeared on USA TODAY: Trump's pick for New Jersey prosecutor, Alina Habba, is serving unlawfully, judge rules

Reporting by Aysha Bagchi, USA TODAY / USA TODAY

USA TODAY Network via Reuters Connect