Special counsel Robert Mueller's lengthy report made public Thursday reviewed President Donald Trump's attempts to muddy the investigation, including efforts to tamper with witnesses, but decided not to charge him with obstruction in part because there was no underlying crime and many of the attempts were carried out in plain view.

But Mueller said that the decision not to charge Trump was a difficult one, and that it was not clear he was innocent of obstructing justice. If the special counsel's office had been certain that Trump did not commit crimes, Mueller said, it would have said so in the report.

Trump, the 448-page report reveals, was panicked when he first found out about Mueller's appointment, saying: "Oh my God. This is terrible. This is the end of my Presidency. I’m f---ed," citing testimony from then Attorney General Jeff Sessions’ chief of staff.

"How could you let this happen, Jeff?" Trump continued, telling Sessions something to the effect of, "You were supposed to protect me. ... This is the worst thing that ever happened to me."

Mueller's office says it weighed charging Trump with obstruction, but didn't in part because "we recognized that a federal criminal accusation against a sitting President would place burdens on the President's capacity to govern and potentially preempt constitutional process for addressing presidential misconduct."

Investigators had looked at Trump's response to reports about Russia's support of his campaign, his firing of FBI Director James Comey, his behavior about charges against his former campaign chairman Paul Manafort and former national security adviser Michael Flynn, and his efforts to get rid of Mueller himself.

That included Trump ordering then-White House Counsel Don McGahn to tell Deputy Attorney General Rod Rosenstein that "Mueller has to go."

"McGahn spoke with the President twice and understood the directive the same way both times, making it unlikely that he misheard or misinterpreted the President’s request. In response to that request, McGahn decided to quit," the report says. "He called his lawyer, drove to the White House, packed up his office, prepared to submit a resignation letter with his chief of staff, (and) told (then-White House Chief of Staff Reince) Preibus that the President had asked him to 'do crazy shit,'" the report continues.

"McGahn ultimately did not quit and the President did not follow up with McGahn on his request to have the Special Counsel removed," the report said.

Download the NBC News app for full coverage of the Mueller report's release

The showdown was reported by The New York Times last year, and derided by Trump as "fake news."

The Mueller report says while Trump may not have been trying to cover up any collusion with the Russians, he did have "a motive to put the FBI's Russia investigation behind him."

The "evidence does indicate that a thorough FBI investigation would uncover facts about the campaign and the President personally that the President could have understood to be crimes or that would give rise to personal and political concerns," it says, noting that Trump had publicly said he'd had no business dealings with Russia even though he'd been aware his company was trying to get a Trump Tower built in Moscow.

As for whether Trump might have been involved in witness tampering, the special counsel cited legal precedent that acting corruptly would require proof of "conscious wrongdoing," but he noted several examples of Trump behaving questionably when it came to Flynn and Manafort.

"With regard to Flynn, the President sent private and public messages to Flynn encouraging him to stay strong and conveying that the President still cared about him before he began to cooperate with the government," the report says.

"With respect to Manafort, there is evidence that the President's actions had the potential to influence Manafort's decision whether to cooperate with the government. The President and his personal counsel made repeated statements suggesting that a pardon was a possibility for Manafort, while also making it clear that the President did not want Manafort to 'flip' and cooperate with the government," the filing notes.

As with the attempted Mueller firing, some of Trump's other directives were ignored by the likes of Sessions and Trump's former campaign manager Corey Lewandowski.

"The president's efforts to influence the investigation were mostly unsuccessful, but that is largely because the persons who surrounded the president declined to carry out orders or accede to his requests," the special counsel wrote.

The report also says Mueller did not believe he had to interview Trump because a legal battle for his cooperation would be lengthy — and his state of mind was obvious.

Prosecutors also consulted an opinion by DOJ’s Office of Legal Counsel that a sitting president can't be indicted, "and accepted OLC's legal conclusion," the report says.

"The evidence we obtained about the President's actions and intent presents difficult issues that would need to be resolved if we were making a traditional prosecutorial judgment," the partially redacted report says.

"At the same time, if we had confidence after a thorough investigation of the facts that the President clearly did not commit obstruction of justice, we would so state. Based on the facts and the applicable legal standards, we are unable to reach that judgement. Accordingly, while this report does not conclude that the President committed a crime, it also does not exonerate him."

While Attorney General William Barr wrote in a memo prior to his appointment last year that Trump could not have obstructed justice because he had the legal authority to do things like fire Comey and consider pardons for witnesses, Mueller took a tougher line, saying "we were not persuaded by the argument that the President has blanket constitutional immunity to engage in acts that would corruptly obstruct justice."

The report says the issue may be one for Congress to decide. It "concluded that Congress can validly regulate the President's exercise of official duties to prohibit actions motivated by a corrupt intent to obstruct justice."

The report also did not find that Trump was trying to cover-up an underlying crime, because investigators did not establish that Trump's team "conspired or coordinated with the Russian government in its election interference activities," despite numerous contacts.

The report says the Russian government “interfered in the 2016 presidential election in sweeping and systematic fashion,” and noted the Internet Research Agency, a Russian hacking and influence company, first began targeting the United States in early 2014.

“The investigation identified two different forms of connections between the IRA and members of the Trump Campaign…First, on multiple occasions, members and surrogates of the Trump Campaign promoted — typically by linking, retweeting, or similar methods of reposting — pro-Trump or anti-Clinton content published by the IRA through IRA-controlled social media accounts. Additionally, in a few instances, IRA employees represented themselves as U.S. persons to communicate with members of the Trump Campaign in an effort to seek assistance and coordination on IRA-organized political rallies inside the United States,” the report found.

Among those who cited or retweeted IRA-controlled accounts were two of the president’s sons, Donald Trump Jr. and Eric Trump, the report notes.

The report also delves into a meeting at Trump Tower in June of 2016 involving Trump Jr., Manafort and a Russian lawyer who'd been offering "dirt" on the Hillary Clinton campaign courtesy of the Russian government. Trump Jr. said the dirt never materialized. While there had been speculation Trump Jr. had told his father about the meeting, the report said they found no evidence that he did. Trump told Mueller’s investigators in a written statement that he has “no independent recollection” of that time period.

A later attempt to spin the meeting as being about Russian adoptions appears to have been motivated for public relation reasons, the report says.

The report says Trump also downplayed talks about a possible Trump Tower Moscow, which were ongoing during the campaign. Trump acknowledged speaking to his lawyer Michael Cohen about the project, but said he was "not enthused about it."

While the investigation found many links between Trump, his people and Russia, "evidence was not sufficient to charge that any member of the Trump Campaign conspired or coordinated with representatives of the Russian government to interfere in the 2016 election."

Trump's legal team issued a statement minutes after the report’s release online, calling it "a total victory for the President. The report underscores what we have argued from the very beginning — there was no collusion — there was no obstruction."

Speaking at a White House event around the same time as the release, Trump said it was "a good day."

"This should never happen to another president again. This hoax should never happen to another president again," he said.