When Special Counsel Robert Mueller was appointed to probe Russian election meddling, Donald Trump told visitors in the Oval Office that the investigation would destroy his presidency.

"Oh my God," Trump said as he slumped in his chair, according to notes taken by assistant attorney general Jody Hunt and incorporated into the special counsel report released Thursday. "This is terrible. This is the end of my presidency. I’m f---ed."

Trump then became angry, according to the report, and attacked then-Attorney General Jeff Sessions, who was also in the Oval Office, for allowing the appointment of Mueller as special counsel.

"How could you allow this to happen, Jeff?" Trump asked. He added that the attorney general was "supposed to protect me," or words to that effect, according to Sessions.

The president later aired his frustration with Sessions publicly, and the rift ultimately led the former Alabama senator to resign his post leading the Justice Department. The decision to launch the investigation was authorized by deputy attorney general Rod Rosenstein, who was put in charge of overseeing the probe after Sessions recused himself, citing his involvement in Trump’s campaign.

Mueller’s appointment came days after Trump fired FBI Director James Comey and news emerged that the president had asked Comey to drop an investigation into former national security adviser Michael Flynn.

Trump went on to complain that the investigation was "the worst thing that ever happened to me," according to the Mueller report.

"Everyone tells me if you get one of these independent counsels, it ruins your presidency," Trump said. "It takes years and years and I won’t be able to do anything."

In a public statement issued shortly after his Oval Office comments, Trump said the investigation would "confirm what we already know -- there was no collusion between my campaign and any foreign entity."

Mueller’s report ultimately didn’t find an “underlying crime” by Trump related to Russian interference in the 2016 election, but it delivered an exhaustive account of Trump’s efforts to head off or undermine the special counsel’s probe. Attorney General William Barr said the Justice Department had determined obstruction did not take place, while Mueller said Congress could take action on Trump’s efforts.