Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

President Donald Trump ordered the firing of special counsel Robert Mueller last June, but backed off when his White House counsel threatened to resign, a source with firsthand knowledge close to the White House told NBC News Thursday.

Mueller is leading an investigation into Russia’s alleged interference in the 2016 presidential election and whether there was any collusion with the Trump campaign.

The New York Times, which first reported Trump's order, cited two people who said that Trump had argued that Mueller had conflicts of interest in the case that disqualified him from overseeing the investigation.

According to the Times, Trump’s reasons for wanting Mueller fired last June included: a past dispute allegedly involving Mueller over fees at Trump National Golf Club in Sterling, Virginia, when Mueller was FBI director; that Mueller could not be impartial because he had most recently worked for the law firm that had previously represented the president’s son-in-law, Jared Kushner; and because Mueller had been interviewed to return as the F.B.I. director the day before he was appointed special counsel in May.

Related: Trump says he is willing to speak to Mueller 'under oath'

White House Counsel Don McGahn refused to ask the Justice Department to fire Mueller, and threatened to quit instead. He told senior White House officials that dismissing Mueller would have disastrous effects on Trump's presidency, the source confirmed to NBC News.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Trump has called the investigation into potential collusion between his campaign and Russia a "hoax" and "witch hunt," repeatedly denying any collusion took place.

Asked about the report that he tried to fire Mueller, Trump told reporters at the Davos summit on Friday morning that it was "fake news."

“Fake news folks, fake news. Typical New York Times fake stories," the president said.

Sen. Mark Warner, D-Va., who is vice chairman of the Senate Intelligence Committee, said in a statement after the Times report that firing the special counsel "is a red line that the President cannot cross."

"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," Warner said in the statement.

Mueller was appointed to head the investigation in May by Deputy Attorney General Rod Rosenstein, after Trump fired FBI Director James Comey. Rosenstein appointed Mueller because Attorney General Jeff Sessions had recused himself.

Mueller led the FBI for 12 years under Presidents George W. Bush and Barack Obama.

Four people connected to Trump or the campaign have been charged or pleaded guilty in connection with Mueller’s probe.

Former Trump campaign manager Paul Manafort and his deputy Rick Gates were indicted in October on charges related to alleged money laundering during a time before they were part of the Trump campaign. They have pleaded not guilty.

Former Trump campaign adviser George Papadopoulos has pleaded guilty to lying to the FBI, and as did Trump’s former national security adviser Michael Flynn in December.

A White House attorney for Trump, Ty Cobb, said in a statement Thursday that "we decline to comment out of respect for the Office of the Special Counsel and its process."

In August, Trump told reporters he never had plans to dismiss Mueller, despite attacking Mueller's investigation as a Democrat-created "fabrication."

"I haven't given it any thought," Trump said then of firing Mueller. "I’ve been reading about it from you people. You say, 'Oh, I’m going to dismiss him.' No, I’m not dismissing anybody."