WASHINGTON — William P. Barr was a lawyer in private practice in June when he wrote an unsolicited memo to the Justice Department that was sharply skeptical of the special counsel’s inquiry into whether President Trump illegally obstructed justice.
Nine months later, Mr. Trump is cleared of that offense, and he has Mr. Barr, his new attorney general, to thank.
Mr. Barr’s decision to declare that evidence fell short of proving Mr. Trump illegally obstructed the Russia inquiry was an extraordinary outcome to a narrative that has unspooled over nearly two years. Robert S. Mueller III was appointed as special counsel to remove the threat of political interference from an investigation involving the president, but he reached no conclusion on the key question of whether Mr. Trump committed an obstruction-of-justice offense.
Mr. Barr stepped in to make the determination, bringing the specter of politics back into the case. Senior Justice Department officials defended his decision as prudent and within his purview, but it reignited a debate about the role of American law enforcement in politically charged federal investigations that has roiled since James B. Comey, as F.B.I. director in 2016, excoriated Hillary Clinton even in announcing that he was recommending she not be charged over her handling of classified emails.
Democrats seized on Mr. Barr’s move, portraying it as a hasty and dubious intervention by a man who had taken over the Justice Department pledging to defend its independence, but ended up clearing a president who installed him in the post just last month. Mr. Mueller submitted his report about 48 hours before Mr. Barr wrote to lawmakers informing them that he and his deputy, Rod J. Rosenstein, had concluded that investigators lacked evidence that the president had illegally obstructed justice, though Mr. Mueller stopped short of exonerating the president.
“His hostility to the prospect of obstruction charges against the president has been now met with what seems to be a fairly rapid decision by him to squelch a case that obviously Bob Mueller found at least plausible,” said Senator Sheldon Whitehouse of Rhode Island, a senior Democrat on the Judiciary Committee and a former federal prosecutor.
The chairmen of six House committees sent Mr. Barr a letter Monday evening demanding access to Mr. Mueller’s full report by April 2 and the underlying evidence shortly thereafter. “Your four-page summary of the special counsel’s review is not sufficient for Congress, as a coequal branch of government, to perform critical work,” they wrote.
The senior Justice Department officials pushed back. Mr. Mueller and two of his deputies told the attorney general on March 5 that he had no intention of deciding on the obstruction issue, according to an official familiar with the discussion. That gave Mr. Barr time to digest the facts along with Mr. Rosenstein, whom the special counsel’s office regularly briefed.
The officials also said the Justice Department applied no pressure on Mr. Mueller as he drew conclusions in the Russia investigation.
Mr. Barr made the “right call,” said Robert W. Ray, the former independent counsel for the Whitewater investigation who took over after Ken Starr stepped down. Since the statute that created independent counsels no longer exists, he said, it is the proper role of the attorney general to render a judgment on such a momentous and novel question.
“We depend on Bob Mueller to gather the information to make that judgment, but in a close call where there are significant both factual and legal hurdles to tackling the president, I think it is important for the department to speak with one voice, and that one voice is the voice of the attorney general,” he said.
Mr. Barr took over at a Justice Department that was still reeling from extraordinary moves by its leaders in recent years, including Mr. Comey’s defiance of longstanding policy to publicly criticize Mrs. Clinton while also declaring that “no reasonable prosecutor” would charge her with a crime as he closed an investigation into the matter.
Mr. Comey’s break with department policy was the subject of a blistering inspector general report, and Mrs. Clinton’s supporters believed that his public statements — and later move to reopen the email investigation days before the election — contributed to her loss to Mr. Trump.
Current and former Justice Department lawyers, including Mr. Barr and Mr. Rosenstein, had sharply criticized Mr. Comey’s handling of the case.
Mr. Mueller’s report arrived at the Justice Department on Friday, when a member of Mr. Mueller’s security team delivered a few hard copies of the team’s confidential findings to Mr. Rosenstein’s office. Those reports were immediately given to Mr. Barr, who began to read.
Over the next two days, he and Mr. Rosenstein met with a small group of aides, including Edward O’Callaghan, Mr. Rosenstein’s top deputy, and Steven A. Engel, the head of the department’s Office of Legal Counsel.
In his letter, Mr. Barr said Mr. Mueller had concluded that the evidence did not show that Mr. Trump or anyone involved with his campaign could be prosecuted for conspiring with the Russian government in its election interference operation — a determination that Mr. Mueller and his deputies had relayed during their March 5 briefing.
But the special counsel had been far more equivocal about whether Mr. Trump had illegally sought to obstruct that investigation, Mr. Barr wrote.
The special counsel’s team examined a pattern of behavior by Mr. Trump that raised questions about whether he obstructed justice, including urging Mr. Comey in February 2017 to drop an investigation into Michael T. Flynn, the former national security adviser; the president’s firing of Mr. Comey; and his appearing to dangle pardons at potential witnesses in the Russia investigation.
Mr. Barr said Mr. Mueller had laid out evidence and arguments both for and against the proposition that Mr. Trump committed obstruction but gave no details of the special counsel’s analysis.
It is not clear from Mr. Barr’s letter whether Mr. Mueller had wanted the attorney general to make the final decision on the obstruction issue, or whether he intended for Congress to absorb the evidence without a prejudgment by law enforcement.
While Mr. Barr did not detail his reasoning for deciding on the case, he appeared to be focusing on the question of whether investigators could prove Mr. Trump had “corrupt intent” in instances where the available evidence about his motivations was ambiguous. Obstruction cases often turn on whether prosecutors can prove that someone acted with an illegitimate motive.
Mr. Barr noted that Mr. Mueller had said there was insufficient evidence to prove any underlying offense of conspiring with Russia, and that “the absence of such evidence bears upon the president’s intent.”
But in narrowly focusing on a lack of evidence that the Trump campaign reached any agreement with the Russian government on sabotaging the election, legal experts said, Mr. Barr left out other reasons the president may have had for wanting to stymie a wide-ranging investigation: It could uncover other crimes and embarrassing facts.
Indeed, it did. The special counsel investigation uncovered a scheme between the president and his former lawyer Michael D. Cohen to violate campaign finance laws by paying hush money to an adult-film actress who alleged an affair with Mr. Trump, which he denies. Other matters related to the president that spun off from the special counsel’s work remain under scrutiny, including financial dealings by his inaugural committee and family business.
The special counsel’s inquiry also led to several of the president’s associates or campaign aides facing criminal charges and brought to light other potentially embarrassing information, including a detailed account of how Russia carried out two covert operations to aid his campaign.
Moreover, Mr. Barr’s suggestion that it could be hard to prove the president acted with a bad motive was at odds with his own previous writings. He has suggested that a president’s use of executive powers are beyond the reach of criminal law — regardless of motive.
In the 19-page memo Mr. Barr wrote unsolicited for the Trump administration last year, he argued that Mr. Mueller ought not be permitted to question Mr. Trump about several actions that he had taken as president that prompted accusations of obstruction.
Mr. Barr contended that a federal law against obstruction of justice should not be interpreted as applying to a president’s exercise of his constitutional authorities — such as to direct the Justice Department to close a case, to fire a subordinate or to pardon someone — as opposed to more familiar ways of impeding an investigation like destroying evidence or suborning perjury.
His argument in part rested on his broad theory of presidential power. But he also worried about the prospect of a world in which every time the Justice Department exercised prosecutorial discretion or changed a prosecutorial team in a controversial case, critics could raise accusations of improper motive and call for a criminal inquiry.
Citing Mr. Barr’s memo as a reason to question his motive in pronouncing Mr. Trump cleared of obstruction, Representative Jerrold Nadler of New York, the chairman of the House Judiciary Committee, said he will call the attorney general to testify.
“The attorney general’s comments make it clear that Congress must step in to get the truth and provide full transparency to the American people,” Mr. Nadler said. “We cannot simply rely on what may be a hasty partisan interpretation of the facts.”