The New York Times reports tonight that President Trump ordered the firing last June of Robert S. Mueller III, the special counsel overseeing the Russia investigation, according to four people told of the matter, but ultimately backed down after the White House counsel threatened to resign rather than carry out the directive.

The West Wing confrontation marks the first time Mr. Trump is known to have tried to fire the special counsel. Mr. Mueller learned about the episode in recent months as his investigators interviewed current and former senior White House officials in his inquiry into whether the president obstructed justice.

According to the Times, after receiving the president’s order to fire Mueller, the White House counsel, Donald F. McGahn II, refused to ask the Justice Department to dismiss the special counsel, saying he would quit instead.

McGahn disagreed with the president’s case and told senior White House officials that firing Mueller would have a catastrophic effect on Trump’s presidency.