WASHINGTON â€” From the onset of his tenure, William P. Barr has been billed as the attorney general that President Trump was looking for. And Mr. Barr has taken some pride in this role, telling Fox News this past weekend that he speaks with the president â€œvery regularly.â€
But for a man who projects unswerving confidence in his political and legal skills, his efforts this month to play presidential intimate have backfired, embarrassing both him and his boss.
The month has brought a string of unusually high-profile miscues for the attorney general. He has been at odds with the White House at critical moments, showing how even top administration officials known for their loyalty can fall out of sync with a president laser-focused on his own political popularity.
Mr. Barr came under fire for his role in ordering federal officers to clear Lafayette Square near the White House on June 1 just before Mr. Trumpâ€™s widely criticized photo op in front of a nearby church.
He annoyed some White House officials when he said the Secret Service had earlier ordered Mr. Trump to shelter in the buildingâ€™s bunker because of the threat of violence from protesters. That contradicted Mr. Trumpâ€™s explanation that he was merely inspecting the bunker, not seeking protection.
And Mr. Trump distanced himself almost immediately from his and Mr. Barrâ€™s decision last week to fire Geoffrey S. Berman as the top federal prosecutor in Manhattan, even though he had discussed the move with Mr. Barr and a possible successor to Mr. Berman, according to two people briefed on the deliberations.
Mr. Barr asked Mr. Berman to leave on Friday afternoon, and he announced the prosecutorâ€™s resignation on Friday night after Mr. Berman refused to go, essentially firing him in public. Mr. Berman then publicly declared that he was not going anywhere. Facing a public relations debacle and legal constraints that made it difficult for Mr. Barr to get rid of Mr. Berman, the attorney general was forced to ask the president to step in and officially fire him.
But soon after Senator Lindsey Graham, Republican of South Carolina and the chairman of the Senate Judiciary Committee, suggested he would not merely rubber-stamp an administration nominee to replace Mr. Berman, Mr. Trump backed away from the whole affair.
â€œWe spent very little time, we spent very little time talking about it,â€ he told Fox News on Saturday. â€œBut the president has to sign a document or I guess give the OK.â€
The result was that Mr. Barr looked as though he had acted without the full backing of the president. He also ended up agreeing to install Mr. Bermanâ€™s deputy, Audrey Strauss, as the acting U.S. attorney instead of his preferred pick, Craig Carpenito, now the top federal prosecutor for New Jersey.
â€œAs attempted power plays go, this was an abject failure and served only to further undermine the credibility of both the attorney general and the president,â€ said Greg Brower, a former federal prosecutor who once headed the F.B.I.â€™s congressional affairs office.
A Justice Department spokeswoman declined to comment for this article.
Even when a judge made favorable statements about the possibility of a legal victory for Mr. Trump this month, it was eclipsed by the Berman debacle. A federal judge ruled that the former national security adviser John R. Bolton may be in jeopardy of forfeiting his $2 million advance or even be prosecuted for failing to scrub classified information out of his new book, as Justice Department lawyers had argued that he was legally required to do.
But the judge refused to order copies of the political memoir seized, noting that more than 200,000 of them were already in the hands of booksellers by the time the department acted. The reasons the department filed so long after the books had been distributed to booksellers are not clear, but days before the judge ruled, the departmentâ€™s division that was handling the case suddenly found itself rudderless.
Joseph H. Hunt, the chief of the civil division, suddenly resigned without even informing Mr. Barr, who had sometimes bypassed him to deal directly with his deputies. Mr. Barrâ€™s penchant for closely managing his staff and impatience with what he sees as too much deliberation have grown in recent weeks, according to department employees who have sat in on meetings with him.
Mr. Huntâ€™s departure also seemed to emphasize the risks of handling cases involving Mr. Trumpâ€™s associates in Mr. Barrâ€™s Justice Department. Other federal prosecutors have either resigned or withdrawn from criminal prosecutions of Mr. Trumpâ€™s former aides after Mr. Barr intervened to drop charges or seek lighter punishment.
The month began with a blast of criticism over the law enforcement response to the protests outside the White House that began May 29 over the death of George Floyd, a black man in Minneapolis who died after a white police officer pressed his knee into his neck for nearly nine minutes.
While the protest was largely peaceful, some demonstrators threw bricks at the Secret Service, others defaced the Treasury Department building next to the White House with graffiti and several broke through a police barricade before being arrested. Just before Mr. Trump set out across Lafayette Square to hold a bible in front of St. Johnâ€™s Church on June 1, law enforcement officials fired a chemical irritant at the crowd to clear the area.
Mr. Barr played a far more critical role in the law enforcement response than was initially understood, essentially assuming battlefield control over a hodgepodge of security forces in Washington for days from a command center he set up, according to people who received briefings inside the center. He was effectively the general overseeing the operation that allowed the president his photo op.
As criticism deepened over the havoc surrounding the photo op, Mr. Barr insisted that he took charge because the protest was turning violent and had to be brought under control â€” not to set up a publicity stunt. But his presence at Mr. Trumpâ€™s side that day made him look less like a commander of officers and more like a presidential prop, a situation he privately said made him uncomfortable, according to two people told of those conversations.
In a June 5 interview with The Associated Press, the attorney general gave a hairsplitting description of his role in directing the law enforcement actions. He never issued a â€œtactical commandâ€ to clear the protesters from Lafayette Square, he said, but his attitude was that officers needed to â€œget it done.â€
Mr. Barr also insisted two days later in an interview with CBSâ€™s â€œFace the Nationâ€ that both he and Defense Secretary Mark T. Esper agreed that as a last resort, the president could invoke the Insurrection Act allowing him to deploy active-duty troops to control protests around the nation, a notion that Mr. Esper had previously seemed to disavow.
That controversy was still fresh when the Justice Department, under pressure from a federal lawsuit, released some passages last week that Mr. Barr and his aides had previously redacted from the 2019 public report by the special counsel, Robert S. Mueller III, about Russian interference in the 2016 election.
Although Mr. Barr has aggressively challenged the basis for that whole inquiry and defended the president, the newly disclosed text showed that prosecutors questioned whether Mr. Trump was telling them the truth in written answers to their questions.
The situation with Mr. Berman, the top prosecutor for the Southern District of New York, again raised the question of whether Mr. Barr was bending over backward to protect the president. A Republican, Mr. Berman pursued a string of cases that have rankled Mr. Trump, including an investigation of hush payments to a woman whose allegations that she had an affair with him threatened to derail his 2016 campaign.
Mr. Berman also obtained an indictment of a state-owned bank in Turkey with political connections that had drawn the presidentâ€™s attention. In his book, Mr. Bolton wrote that Mr. Trump had promised President Recep Tayyip Erdogan of Turkey in 2018 that he would intervene in the inquiry against the bank for violating sanctions against Iran. Multiple people close to both Mr. Berman and Mr. Barr said both men felt that charges needed to be brought, but that they clashed over questions of law and strategy.
Prosecutors under Mr. Berman were scrutinizing whether the presidentâ€™s personal lawyer Rudolph W. Giuliani violated laws on lobbying for foreign entities in his efforts to dig up damaging information in Ukraine on the presidentâ€™s political rivals. If the Trump administration was hoping to exert political pressure to derail that investigation, some former prosecutors said, firing Mr. Berman appears to have backfired.
â€œThe Berman situation was mishandled both procedurally and substantively,â€ said Mr. Brower, the former federal prosecutor and senior F.B.I. official. â€œThe Southern District of New York continues to investigate whatever it is investigating, and Barrâ€™s preferred new United States attorney doesnâ€™t actually get the job.â€
Maggie Haberman contributed reporting from New York.