It is rare for judges to reject an interim prosecutor from continuing in the role, according to experts. The group of judges made the decision just as Habba’s 120-day post was set to end.

The judges selected her deputy, career prosecutor Desiree Leigh Grace, to take over the role. No reason was given for the decision.

But shortly after news of her replacement was made public, Attorney General Pam Bondi announced Grace had been “removed” from the post.

“This Department of Justice does not tolerate rogue judges – especially when they threaten the President’s core Article II powers,” Bondi said in a social media post.

Habba has clashed with Democrats since taking office in March.

During her tenure, she has filed assault charges against a Democratic congressman, and opened investigations into the state’s Democratic governor and attorney general.

US Deputy Attorney General Todd Blanche said in a post on Monday that Habba had the backing of Trump and the justice department, and dismissed criticism of her as “political noise.”

After the ruling from the 17 judges, he again took to X to accuse the judges of pushing “a left-wing agenda, not the rule of law”.

“When judges act like activists, they undermine confidence in our justice,” he wrote.

Exactly when Habba’s term expires is the subject of some confusion.

She was named by Trump on 24 March “effective immediately”, meaning her 120-day term would expire on Tuesday. However, she was officially sworn in four days later, on 28 March in an Oval Office ceremony.

New Jersey’s two senators – both Democrats – have opposed her nomination to be the US attorney for the state, arguing that she has pursued “frivolous and politically motivated” prosecutions and “did not meet the standard” for the office.

A similar situation played out last week in New York, where judges voted to block the interim US attorney from staying on.

John Sarcone III departed the role, but will stay on as an “special attorney to the attorney general”, according to the justice department.