A former prosecutor on special counsel Robert S. Mueller III’s team writes in a new book that the group failed to fully investigate President Trump’s financial ties and should have stated explicitly that they believed he obstructed justice, claiming that their efforts were limited by the ever-present threat of Trump disbanding their office and by their own reluctance to be aggressive.

In an explosive tell-all that offers the most detailed account yet of what happened behind the scenes during Mueller’s two-year investigation of Russian interference in the 2016 election, Andrew Weissmann writes of his frustration that the special counsel failed to subpoena the president and otherwise pulled punches for fear of incurring Trump’s wrath.

He lays particular blame on Mueller’s top deputy, Aaron Zebley, for stopping investigators from taking a broad look at Trump’s finances and writes that he now wonders whether investigators had “given it our all,” knowing they left many important questions unanswered.

“As proud as I am of the work our team did — the unprecedented number of people we indicted and convicted and in record speed for any similar investigation — I know the hard answer to that simple question: We could have done more,” Weissmann writes.

Weissmann, a former federal prosecutor and Justice Department supervisor who now teaches at New York University School of Law and comments as a legal analyst for MSNBC, is the first prosecutor on Mueller’s team to truly break his silence about the investigation that dogged Trump’s presidency. Throughout the probe, Mueller and the others were famously tight-lipped about what they were finding, and while some prosecutors have given interviews to reporters upon joining private law firms, they have revealed little about the special counsel’s work.

The book, titled “Where Law Ends,” holds little back, offering colorful observations about other members of the team, their targets and the White House — asserting that all Trump White House counsel members referred to the Oval Office as the reality-free “Magic Kingdom.” He puts in more plain language many of the Mueller report’s conclusions and points to what he saw as the team’s ultimate failures and the questions they left unanswered.

“We still do not know if there are other financial ties between the president and either the Russian government or Russian oligarchs,” Weissmann writes. “We do not know whether he paid bribes to foreign officials to secure favorable treatment for his business interests, a potential violation of the Foreign Corrupt Practices Act that would provide leverage against the president. We do not know if he had other Russian business deals in the works at the time he was running for president, how they might have aided or constrained his campaign, or even if they are continuing to influence his presidency.”

Mueller ultimately concluded he could not prove a criminal conspiracy between the Trump campaign and the Russian government to influence the last presidential election. He drew no conclusion on whether Trump obstructed justice — in part because of a Justice Department legal opinion that a sitting president cannot be indicted, combined with concerns over fairness, because if he faced no indictment, Trump could not defend himself in court. Attorney General William P. Barr and then-Deputy Attorney General Rod J. Rosenstein said ahead of the report’s public release that they evaluated the case themselves and determined Trump could not be charged with obstruction.

Weissmann condemns Barr, White House attorneys and others for enabling a “lawless” president. He confesses that the office never overcame a key challenge: “the president’s power to fire us and to pardon wrongdoers who might otherwise cooperate.”

Weissmann is critical of Mueller for not stating plainly that he had concluded Trump obstructed justice, which Weissmann said the evidence showed. Weissmann said in an interview with The Washington Post that he told Mueller he would have stated that conclusion in the team’s final report.

“Director Mueller’s decision was to not make that conclusion, and by the way, I would have done it,” Weissmann said. “I told him why I would have done that.”

Weissmann said that while he believed it remained possible for Trump to be charged after he leaves office, he was noncommittal on whether he should be.

“I would want to know from the president or anybody else who you were focused on . . . ‘please tell me why we are factually or legally wrong but what you want us to consider,’ ” Weissmann said. “You want to hear from the defense and see what you’re missing, and then you need to make the decision, assuming you got through all of that, whether it’s really the right thing for the country at that point.”

Weissmann said that while he was concerned about the United States being viewed as a country where those not in power are prosecuted, he was also concerned that a precedent could be set by letting a president off the hook for wrongdoing.

“I think there’s an enormous interest in making sure that whatever is decided doesn’t set a precedent that there’s license for the next president or the next presidencies to commit crimes with no consequences to them,” he said.

In the book, Weissmann lambastes Barr for, among other things, giving the public a four-page summary of Mueller’s work before it was released publicly — asserting that Barr “had betrayed both friend and country.” Barr said Mueller did not find coordination between the Trump campaign and Russia and reached no conclusion on obstruction; Mueller’s report was far more damning than that anodyne description. It was upon reading Barr’s description, he said, that he decided to write a book.

“I wrote it very much so there would be a public record from somebody, at least one viewpoint, from the inside as opposed to the story being told in maybe a less accurate way by people from the outside,” he told The Post.

Weissmann also asserts that Mueller’s team “had left it to Congress to make its own assessment of our evidence, or to another prosecutor in the future, who would be free to indict the president once he’d left office,” only to have Barr and Rosenstein step in to say the evidence did not warrant obstruction charges. In an interview, he said he would have liked to have seen Congress “do more” with the report, but that it was not his place to say whether they should have impeached Trump based on Mueller’s findings.

“That’s not my call,” he said.

Weissmann writes that the president’s attacks on the special counsel’s office and those on its team created the perpetual fear the office would be disbanded, and he describes how the team made sure its work was logged in a computer system so it would be preserved. But the pressure, he says, also served in some ways to limit its work.

“This sword of Damocles affected our investigative decisions, leading us at certain times to act less forcefully and more defensively than we might have,” Weissmann writes. “It led us to delay or ultimately forgo entire lines of inquiry, particularly regarding the president’s financial ties to Russia.”

Weissmann repeatedly jabs at Zebley, comparing him unkindly to “timorous” Civil War Gen. George B. McClellan, whom President Lincoln famously relieved of his command in part over concerns he was not sufficiently aggressive. Weissmann alleges that Zebley so feared the office would be disbanded by Trump, he repeatedly encouraged less aggressive maneuvers.

“Aaron had a way of gaslighting you, of making you question your own reality, that you were being too aggressive in your drive to pursue leads and push harder — like you were not enough of an adult,” Weissmann writes.

In one of the book’s most notable passages, Weissmann writes that Zebley told another prosecutor, Jeannie Rhee, to “stand down” in pursuing emails from the Trump Organization because that could jeopardize the negotiations for an interview with Trump.

“For Jeannie, this directive was the last straw,” Weissman writes, adding later, “From then on, ‘Better to get fired’ was the refrain we tossed back and forth every time we sensed our office pulling back from our mission.”

Weissmann writes that he and Rhee never took the issue to Mueller, and in interviews with The Post, he faulted himself for not pressing it more aggressively.

“I don’t think it would have made a difference, but I think I could have made more of an argument for doing a financial investigation later, as the investigation proceeded,” he said.

Weissmann said seeking the president’s tax returns might have been a “secondary issue,” but the special counsel could have taken other steps, such as examining whether Russian money had found its way to political action committees.

Mueller and Zebley did not respond to messages seeking comment.

Weissmann says his primary task was to lead the team, called Team M, that investigated former Trump campaign chairman Paul Manafort for financial crimes in hopes he’d become a useful witness. Another team, Team R, was tasked with exploring whether the Trump campaign had coordinated with Russia to influence the election, and another, Team 600, was tasked with exploring whether Trump had obstructed justice.

Weissmann is critical of that latter team, saying an FBI agent assigned to it complained to him it was “pulling its punches and shooting down her views.” And he alleges its leader, Michael Dreeben, confided in him that he would not have been so mealy-mouthed about saying the president had obstructed justice.

“If you and I were in charge, this is not how it would read,” Weissmann says Dreeben told him.

Weissmann faults Zebley for not disclosing supporting classified evidence to Congress, including about Konstantin Kilimnik, the Russian-intelligence-linked lieutenant of Manafort. The Mueller report referred only obliquely to Kilimnik, who was repeatedly given internal swing-state polling data during the campaign and who after the election asked Manafort for a “wink” or a nod of approval from Trump for Russia to take over Ukraine’s richest region.

More critically, Weissmann complains how he felt Mueller was wrong not to greenlight issuing a subpoena for Trump’s testimony and details how he personally pressed the special counsel to do so. The office also declined to compel testimony from the president’s son, Donald Trump Jr., or even to seek an interview with daughter Ivanka Trump, a key campaign and White House figure.

“What are we saying to future presidents, and to future investigators, who will have our decision thrown in their face?” Weissmann says he told Mueller. “If we do not subpoena the president in this investigation, how can others justify the need to do so?”

But he says it soon became clear to him his pitch came too late, and he lays some blame on Rosenstein for not giving the special counsel’s office clear guidance on whether the Justice Department would back such a move. While the office did not need Rosenstein’s approval, Weissmann writes, the deputy attorney general could overrule the decision, and the law required Congress eventually be made aware of that.

“Ironically, this requirement would work counter to its intent; Mueller and Aaron did not want any public disagreements now or ever,” Weissmann writes.

In the interview, Weissmann said Mueller was in charge of the operation and “ultimately, whether good or bad, it redounds to him.” But he said in some instances, Mueller showed more of a willingness to take aggressive steps; for example, Weissmann said, he authorized the FBI to search Manafort’s apartment when Zebley seemed reluctant.

Weissmann, a registered Democrat and donor, became a persistent target of Trump’s attacks during the probe, and he reveals how he, more than once, offered to quit the team, though Mueller would not allow it. He writes that Rhee’s husband eventually bought him and Rhee matching baseball hats memorializing one of the president’s common attacks on the special counsel’s office.

“Jeannie’s said ‘Angry Democrat #2’; mine said ‘Angry Democrat #1’ with ‘Weissmann’ on the back to nail down the point,” Weissmann writes.

Weissmann said he was barred by Justice Department rules from speaking publicly before his book cleared department review in mid-July, and invoked that pre-publication clearance and the White House and Barr’s decision to publish the Mueller report as reasons for unloading on the president now.

Weissmann meticulously traces some of the team’s highs and lows and describes vivid scenes from inside the investigation. He writes of how Jim Quarles, who led the obstruction probe would exclaim, “Pardon me! Pardon me!” as he walked through the halls — a dark joke about Trump dangling pardons to people they were investigating. He says the team joked about eventually becoming the subject of investigation itself, with Rhee even remarking that if Trump won November’s election, “we all need to retain criminal lawyers.”

Barr has tasked U.S. Attorney John Durham in Connecticut with reviewing the Russia probe that the special counsel’s office took over with Mueller’s appointment. Weissmann said in an interview he has not been approached by Durham.

Weissmann curiously concludes that it was “unlikely” to have made any difference if investigators had been more aggressive, though doing so was important because, “The facts should still matter.”

He asserts that the government needs to overhaul special counsel rules, such as expanding the authority of Congress and the director of national intelligence to appoint such a prosecutor. He also notes that neither the White House nor Congress has moved to defend U.S. elections from the new threat of information warfare, adding that Russia’s main intelligence agency has “gotten what it had worked so hard for, a servile, but popular, American leader” willing to overlook a threat “as pernicious as anything we faced in World War II or on 9/11.”

“There is no other way to put it,” Weissmann writes. “Our country is now faced with the problem of a lawless White House, which addresses itself to every new dilemma or check on its power with a belief that following the rules is optional and that breaking them comes at minimal, if not zero, cost.”