President Donald Trump’s ex-lawyer Alina Habba has been disqualified from serving as New Jersey’s top federal prosecutor.

A federal appeals court said Monday the Trump administration’s maneuvers to keep Habba in the role were contrary to federal laws governing appointments.

A panel of judges from the 3rd U.S. Circuit Court of Appeals in Philadelphia sided with a lower-court judge’s ruling after hearing oral arguments at which Habba was present Oct. 20.

The ruling comes amid the push by Trump’s Republican administration to keep Habba as the acting U.S. attorney for New Jersey, a powerful post charged with enforcing federal criminal and civil law.

Habba’s personal staffer did not return messages seeking comment from The Associated Press.

The White House had no immediate comment on Habba and referred questions to the Department of Justice.