President Trump on Friday slammed as “fake news” a bombshell report that he ordered the firing of special counsel Robert Mueller last year — backing down only when the White House lawyer threatened to quit.

“Fake news, fake news. Typical New York Times. Fake stories,” Trump told reporters before he was to deliver a major speech to world and business leaders at the World Economic Forum summit in Davos, Switzerland.

The paper reported Thursday that Trump demanded Mueller’s firing only weeks after the Russia investigation special prosecutor was first appointed by Deputy Attorney General Rod Rosenstein.

Mueller is leading the probe into allegations of collusion between the president’s campaign team and Russia in the 2016 election. Trump has repeatedly denied any collusion and has assailed the probe as a witch hunt.

The Times reported that White House counsel Don McGahn opposed the firing decision, telling senior officials it would have a “catastrophic effect” on Trump’s presidency.

After McGahn threatened to resign, Trump changed his mind, the paper reported, citing four anonymous sources.

The Washington Post, also citing anonymous sources, confirmed that the president sought to fire Mueller in June 2017 but reconsidered after McGahn’s threat.

“We decline to comment out of respect for the Office of the Special Counsel and its process,” Trump attorney Ty Cobb said.

In August 2017, Trump told reporters that he had not considered booting Mueller — about two months after he reportedly did just that.

“I haven’t given it any thought. I mean, I’ve been reading about it from you people, you say, ‘Oh, I’m gonna dismiss him.’ No, I’m not dismissing anybody,” Trump said.

According to the Times report, Trump had accused Mueller of three conflicts of interest that he claimed disqualified him from running the Russia collusion probe.

The three arguments were that Mueller had ended his membership at a Trump golf course over a dispute about fees; had worked for the law firm that previously represented Trump’s son-in-law, Jared Kushner; and had been interviewed to return as FBI director before he was appointed special counsel.

Democratic Sen. Mark Warner, vice chairman of the Senate Select Committee on Intelligence, said Thursday that firing Mueller would cross a “red line.”

“I’ve said it before, and I am saying it again: Firing the special counsel is a red line that the president cannot cross,” Warner said in a statement, according to Agence France-Presse.

“Any attempt to remove the special counsel, pardon key witnesses, or otherwise interfere in the investigation, would be a gross abuse of power, and all members of Congress, from both parties, have a responsibility to our Constitution and to our country to make that clear immediately.”

The day before, Trump for the first time directly said he would cooperate with Mueller.

“I would love to do it,” Trump told reporters in an impromptu press conference at the White House when asked about testifying. “I would do it under oath, absolutely.”

With Post wires