NEW YORK — When Attorney General William P. Barr announced Friday night that Manhattan U.S. Attorney Geoffrey Berman would step down and the post would be filled on an interim basis by the sitting chief prosecutor in neighboring New Jersey, Justice Department veterans and legal observers were baffled.

Why would Barr not promote Berman's second-in-command, Audrey Strauss, as is customary while a president's new nominee awaits Senate confirmation?

Among the attorney general's critics, an answer soon became evident: Berman's departure was neither planned nor voluntary but driven by long simmering frustrations over his office's pursuit of investigations targeting President Trump's interests and members of his inner circle.

Berman’s refusal to leave quietly — he indicated a desire to ensure that “important cases continue unimpeded” — forced Barr’s hand. On Saturday the attorney general announced that plans had changed and Strauss, 72, would take charge instead while the nomination of Securities and Exchange Commission Chairman Jay Clayton is pending.

The reversal brought an immediate and collective sigh of relief, said Samidh Guha, a former assistant U.S. attorney in the office, “as we know continuity will be ensured and none of the office’s work will be compromised.”

Strauss, according to colleagues in the legal community, has never sought the spotlight but possesses the experience and acumen to guide the office through such an extraordinarily chaotic moment while upholding its long-standing tradition of independence in important public corruption matters. Berman, in his statement Saturday agreeing not to prolong the fight with Barr, made clear his belief that the office of more than 200 attorneys could be “in no better hands” than those of his handpicked deputy.

Those who know Strauss said that they believe the changeover will be relatively seamless and that she’ll continue to fight against political misconduct.

Over the past two years, Strauss was part of several politically sensitive cases infiltrating Trump’s orbit, including the tax fraud and campaign finance case brought against the president’s former lawyer Michael Cohen. An investigation of Trump’s current lawyer, Rudolph W. Giuliani, has been a source of aggravation for the president.

Joon Kim, who preceded Berman as an interim U.S. attorney and formerly held the same deputy position from which Strauss was just promoted, said she would be devoted to the most touchy of cases because she would have been “actively” involved in those matters since becoming deputy in February 2018. “I would expect that she was very much involved in all of the important cases in the office,” Kim said.

Paul Shechtman, a former federal prosecutor in Manhattan who worked with Strauss, predicted she would not “wilt” if faced with pressure to abandon cases viewed unfavorably by the president or the attorney general.

“She grew up in that office,” Shechtman said, of the Southern District of New York, where he and Strauss were contemporaries during the 1980s. “The traditions of that office are embedded in her, and one of those traditions is a fierce sense of independence and a sense that one follows the evidence, doesn’t rush to judgment, but isn’t afraid to make judgments even if they might be politically inconvenient.”

Barr’s critics have suggested his attempt to bring in Craig Carpenito, the U.S. attorney in New Jersey, was motivated by a desire to curtail the New York office’s independent streak. A Justice Department spokeswoman did not respond Sunday to questions seeking clarity as to why the attorney general initially passed over Strauss.

It’s unclear how long Strauss will remain in the role, as Clayton’s nomination to take over the job may already be in trouble. On Saturday, Sen. Lindsey O. Graham (R-S.C.), chairman of the Senate Judiciary Committee, signaled he would honor the “blue slip” veto system granting home-state senators a say in whose nomination proceeds. The move probably seals Clayton’s fate, as neither Democratic senator from New York is expected to acquiesce.

While Graham may come under pressure from corners of the Republican Party to reverse his decision, it is unlikely Senate Majority Leader Mitch McConnell (R-Ky.) would take steps to force the issue. Extraordinary measures to circumvent the committee are an even unlikelier option, as it would take 60 votes — meaning all Republicans plus seven Democrats — to pull a nominee out of the committee’s jurisdiction and straight to a floor vote, and Democrats are all but universally opposed to Clayton’s confirmation.

Graham, one of Trump’s closest allies, issued a statement Saturday expressing that he, too, had confidence in Strauss, saying he believed she would run the office “in a professional and ethical manner.”

Danya Perry was a senior trial attorney and deputy chief of the criminal division in the U.S. attorney’s office in Manhattan during her tenure there from 2002 to 2013. She knows Strauss socially and through professional networks and believes she will “doggedly pursue” existing investigations, no matter how delicate. Strauss, Perry said, is “uniformly viewed as following the cases, doing the right things for the right reasons.”

Karoun Demirjian in Washington contributed to this report.