A US appeals court has ruled that President Donald Trump’s former personal lawyer, Alina Habba, has been unlawfully serving as top federal prosecutor for New Jersey – a ruling likely to affect scores of criminal cases in the state.The president handpicked Habba for the role of US attorney this year, but a district court rejected her nomination, so the Trump administration installed her in a role that allowed her to fill in on an acting basis.The appellate judges found on Monday that this tactic, which bypassed confirmation by the US Senate, violated the Federal Vacancies Reform Act. Habba is the second Trump-appointed prosecutor to be disqualified in recent weeks.”It is apparent that the current administration has been frustrated by some of the legal and political barriers to getting its appointees in place,” one of the appellate judges, Judge Michael Fisher, wrote in Monday’s ruling disqualifying Habba. The BBC has contacted Habba’s office, the White House, and the Department of Justice for comment. In a joint statement, three lawyers who had challenged Habba’s authority – Abbe David Lowell, Gerry Krovatin, and Norm Eisen – wrote that this marks “the first time an appeals court has ruled that President Trump cannot usurp longstanding statutory and constitutional processes to insert whomever he wants in these positions”.The statement continued: “We will continue to challenge President Trump’s unlawful appointments of purported US Attorneys wherever appropriate.”Habba, 41, first joined Trump’s personal legal team in 2021 after reportedly meeting him at his golf club in Bedminster, New Jersey. She went on to represent Trump in his hush-money trial in New York last year, when he was convicted on 34 counts of falsifying business records. Trump has filed an appeal against that conviction. Before Habba took on the role of US Attorney for New Jersey, Trump had announced he was appointing her as his presidential counsellor during his second administration, describing Habba as “unwavering in her loyalty” and a “tireless advocate for justice”.Monday’s ruling may force the justice department to find a new prosecutor to supervise federal criminal cases in New Jersey. The appellate court’s decision cam …