Alina Habba, US President Donald Trump's pick to serve as the top federal prosecutor in New Jersey, has resigned from the job after an appeals court ruled she had been serving in the post unlawfully.
In a statement posted on social media, Ms Habba accused the courts of becoming "weapons for the politicized left", but said she was resigning "to protect the stability and integrity" of her office.
"But do not mistake compliance for surrender," she said, adding that the government would continue its appeal of the court rulings that ousted her from the position.
"This decision will not weaken the Justice Department and it will not weaken me."
Ms Habba, who was formerly the president's personal attorney, was one of several acting US attorneys around the country to have their appointments challenged on the basis that they stayed in the temporary jobs longer than the law allows.
She said she would remain with the Department of Justice (DOJ) as a senior advisor to Attorney-General Pam Bondi, and her former duties will be split between three DOJ lawyers.
During her temporary term, Ms Habba brought a trespassing charge against the Democratic mayor of Newark, New Jersey, stemming from his visit to an immigration detention centre.
Those charges were later dropped.
She also charged House of Representatives member LaMonica McIver with assaulting a federal agent during the same incident — a charge the Democrat denies.
Mr Trump first selected Ms Habba for the US attorney for New Jersey in a more permanent capacity in March, despite her having no experience as a prosecutor.
When a district court rejected the nomination, the government installed her on a temporary basis.
Once a partner in a small New Jersey firm, Ms Habba was among Mr Trump's most visible legal defenders before he returned to the White House.
Trump lashes appointments deadlock
The Senate Judiciary Committee, which oversees DOJ executive and judicial appointment nominations, has an informal custom of refusing to act on nominees if they are opposed by senators representing the state involved.
Senators are sent a "blue slip" form they can use to submit favourable or unfavourable opinions of a nominee, which the committee considers when deciding whether to confirm their nomination.
Opinions given in blue slips are not binding for the Senate Judiciary Committee, though.
In 2018, committee chair Chuck Grassley scrapped the policy as it applied to circuit court nominees.
That move led to a judge becoming the first circuit court nominee since 1982 to be confirmed without support from both home state senators, according to the Alliance for Justice.
Across Mr Trump's first term as president, 17 judges were confirmed despite opposition from at least one senator of that state.
But under the president's second term, Mr Grassley has defended the blue slips process against public calls for it to be abandoned entirely.
"A U.S. Atty/district judge nominee without a blue slip does not hv [have] the votes to get confirmed on the Senate floor & they don't hv [have] the votes to get out of cmte [committee]," he wrote in August.
"As chairman I set Pres Trump noms up for SUCCESS NOT FAILURE."
Asked about Ms Habba's resignation on Monday, Mr Trump lashed out at a deadlock on getting several of his judicial picks appointed.
"It's a horrible thing," the president told reporters at the White House.
"It makes it impossible to appoint a judge or a US attorney.
"I guess I just have to keep appointing people for three months and then just appoint another one, another one. It's a very sad situation. We're losing a lot of great people."
Mr Trump's critics say he has been exploiting legally questionable loopholes to put unqualified loyalists in jobs that require US Senate confirmation.
As reporters left the press event, Mr Trump could be heard lamenting that he "can't appoint anybody".
"Everybody I've appointed, their time has expired …" he could be heard telling someone.
Senate Republicans echoed his sentiments in a statement on social media, accusing Democrats of delaying "even the most highly qualified, bipartisan and uncontroversial" nominees.
DOJ vows to fight disqualifications
When Ms Habba's term expired in July, a panel of federal judges appointed one of her subordinates to the role.
But Ms Bondi promptly fired the replacement, blaming Ms Habba's removal on "politically minded judges".
A lower court judge found Ms Habba was unlawfully serving in the position, which triggered a months-long legal stand-off.
Earlier this month, a federal appeals court in Philadelphia disqualified her from serving in the role, writing in their opinion, "the citizens of New Jersey and the loyal employees in the US Attorney's Office deserve some clarity and stability".
Ms Bondi said Ms Habba will return as US attorney if the administration's court appeals are successful.
"These judges should not be able to countermand the president's choice of attorneys entrusted with carrying out the executive branch's core responsibility of prosecuting crime," she said.
Several other Trump administration prosecutors have had their appointments as US attorneys challenged.
In Virginia, a judge dismissed criminal cases against former FBI Director James Comey and New York Attorney General Letitia James on the grounds the interim US attorney who filed the charges, Lindsey Halligan, was unlawfully appointed.
In September and October, federal judges disqualified the acting US attorneys in Nevada and Southern California, saying they had stayed in the temporary jobs longer than allowed by law.
On Thursday, another federal judge heard an argument by Ms James that the administration also twisted the law to make John Sarcone the acting US attorney for northern New York.
ABC/AP