In early December, President Donald Trump, furious over news reports about a new round of subpoenas from the office of the special counsel, Robert Mueller, told advisers in no uncertain terms that Mueller’s investigation had to be shut down.

The president’s anger was fueled by reports that the subpoenas were for obtaining information about his business dealings with Deutsche Bank, according to interviews with eight White House officials, people close to the president and others familiar with the episode. To Trump, the subpoenas suggested that Mueller had expanded the investigation in a way that crossed the “red line” he had set last year in an interview with the New York Times.

In the hours that followed Trump’s initial anger over the Deutsche Bank reports, his lawyers and advisers worked quickly to learn about the subpoenas, and ultimately were told by Mueller’s office that the reports were not accurate, leading the president to back down.

Trump’s quick conclusion that the erroneous news reports warranted firing Mueller is also an insight into Trump’s state of mind about the special counsel. Despite assurances from leading Republicans like House Speaker Paul Ryan that the president has not thought about firing Mueller, the December episode was the second time Trump is now known to have considered taking that step. The other instance was in June, when the White House counsel, Donald McGahn, threatened to quit unless Trump stopped trying to get him to fire Mueller.

The December episode, which has never been publicly reported, has new resonance following the disclosure on Monday that FBI agents had carried out search warrants at the office and hotel room of Trump’s personal lawyer, Michael Cohen. In that action, the Justice Department seems to have walked directly up to — if not crossed — Trump’s red line by examining something that seems unrelated to Russia.

Among the documents the agents sought were some related to two women who said they had affairs with Trump, and information related to the role of the publisher of The National Enquirer in silencing one of the women.

After learning about the raid, the president again erupted in anger. He told reporters that federal authorities had “broke in to the office” and he called it “a disgraceful situation” and “a total witch hunt.”

When Trump told McGahn in June to have Mueller fired, the president cited a series of conflict-of-interest issues that he insisted disqualified the special counsel from overseeing the investigation. Among the issues Trump cited was a dispute Mueller had with Trump’s Washington-area golf course years earlier. Trump told McGahn to tell Rod Rosenstein, the deputy attorney general and Mueller’s superior, that the time for Mueller to go had come.

McGahn believed those issues were not grounds for Mueller to be fired and refused to call the Justice Department.

Over the next couple of days, Trump pestered McGahn about the firing, but McGahn would not tell Rosenstein. The badgering by the president got so bad that McGahn wrote a resignation letter and was prepared to quit. It was only after McGahn made it known to senior White House officials that he was going to resign that Trump backed down.

The articles that provoked Trump’s anger in December — which were published by Bloomberg, the Wall Street Journal and Reuters — said one of Mueller’s subpoenas had targeted Trump’s and his family’s banking records at Deutsche Bank. Trump’s lawyers, who have studied Trump’s bank accounts, did not believe the articles were accurate because Trump did not have his money there.

The lawyers were also able to learn that federal prosecutors in a different inquiry had issued a subpoena for entities connected to the family business of Trump’s son-in-law, Jared Kushner. The news outlets later clarified the articles, saying that the subpoena to Deutsche Bank pertained to people affiliated with Trump, who was satisfied with the explanation and dropped his push to fire Mueller.

The White House did not respond to an e-mail seeking comment.

Acutely conscious of the threat Mueller’s investigation poses, Trump has openly discussed ways to shut it down. Each time, he has been convinced by his lawyers and advisers that taking the step would only exacerbate his problems. In some cases, they have explained to Trump how anything that causes him to lose support from congressional Republicans could further imperil his presidency.

But Trump’s statements to his advisers have been significant enough to attract attention from Mueller himself. Mueller’s investigators have interviewed current and former White House officials and have requested documents to understand whether these efforts show evidence the president is trying to obstruct the Justice Department’s investigation, according to two people briefed on the matter.

Trump’s frustrations have tended to flare up in response to developments in the news, especially accounts of appearances of witnesses, whom Trump feels were unfairly and aggressively approached by investigators. They include his former communications director, Hope Hicks, and his former campaign manager, Corey Lewandowski.

The venting has usually been dismissed by his advisers, many of whom insist they have come to see the statements less as direct orders than as simply how the president talks, and that he often does not follow up on his outbursts.

One former adviser said that people had become conditioned to wait until Trump had raised an issue at least three times before acting on it. The president’s diatribes about Attorney General Jeff Sessions, Rosenstein and the existence of the special counsel have, for most of the White House aides, become a dependable part of the fabric of life working for this president.