In this June 7, 2017, file photo, FBI acting director Andrew McCabe listens during a Senate Intelligence Committee hearing. (Alex Brandon/AP)

Memos written by Andrew McCabe when he was the acting FBI director say that Deputy Attorney General Rod J. Rosenstein suggested he secretly record his talks with President Trump, and that Rosenstein discussed possibly trying to remove Trump from office, according to people familiar with the matter.

The account, first reported by the New York Times, paints Rosenstein as so concerned in May 2017 in the wake of Trump’s firing of FBI Director James B. Comey that he contemplated secretly recording conversations with the president. He also initiated discussions about invoking the 25th Amendment, which details how the Cabinet can decide whether a president is no longer able to discharge the duties of the office, one of the McCabe memos said.

The revelations immediately prompted speculation that Trump might seize on the new information to fire Rosenstein. The deputy attorney general oversees special counsel Robert S. Mueller III’s investigation into Russian interference in the 2016 election and whether any Trump associates conspired in those efforts.

Speaking at a rally in Springfield, Mo., on Friday evening, Trump said, “Look at what’s being exposed at the Department of Justice and the FBI. We have great people in the Department of Justice . . . but we have some real bad ones. You see what’s happening at the FBI, they’re all gone, they’re all gone. But there’s a lingering stench and we’re going to get rid of that, too.”

The saga features two of the president’s biggest targets for public criticism, McCabe and Rosenstein, both of whom he blames for an investigation he calls a “witch hunt.” In this instance, McCabe’s memos offer an extraordinary account of Rosenstein’s thinking at a difficult time in the Justice Department and could give Trump fresh ammunition to move to oust Rosenstein.

McCabe was fired this year, and a grand jury is weighing possible charges against him for allegedly misleading investigators in a leak probe.

McCabe’s lawyer, Michael Brom­wich, said in a statement that his client “drafted memos to memorialize significant discussions he had with high level officials and preserved them so he would have an accurate, contemporaneous record of those discussions. When he was interviewed by the special counsel more than a year ago, he gave all of his memos — classified and unclassified — to the special counsel’s office. A set of those memos remained at the FBI at the time of his departure in late January 2018. He has no knowledge of how any member of the media obtained those memos.”

Rosenstein denied the account.

“The New York Times’s story is inaccurate and factually incorrect,” Rosenstein said. “I will not further comment on a story based on anonymous sources who are obviously biased against the department and are advancing their own personal agenda. But let me be clear about this: Based on my personal dealings with the president, there is no basis to invoke the 25th Amendment.”

In a second statement hours later, Rosenstein said: “I never pursued or authorized recording the president and any suggestion that I have ever advocated for the removal of the President is absolutely false.”

That statement came after White House officials pressured the Justice Department to issue a more forceful denial, according to an adviser who spoke to the president. 

Trump asked advisers Friday if he should fire Rosenstein, and some of those around the president sought to sway him not to make any decision Friday night. During those discussions, Trump said he did not trust Rosenstein or McCabe, the adviser said.

People familiar with the 2017 discussions — and the memos written about the discussions — offered wildly divergent accounts of what was said and what was meant.

Most of the key discussions took place on May 16 — at a time of high stress and concern within the upper echelons of the Justice Department and the FBI. Comey had just been fired, and his deputy, McCabe, like many in the FBI, was deeply upset about that action by Trump, according to people familiar with the matter.

Comey’s firing also alarmed Justice Department officials, but they had an additional concern. Rosenstein had written a memo criticizing Comey’s handling of the earlier FBI investigation into Hillary Clinton’s use of a private email server for government business. That memo was used by the White House as a central justification for Comey’s firing, but many law enforcement officials suspected that that was a pretext and that Rosenstein had been manipulated into providing cover for possible obstruction of justice.

Rosenstein was under tremendous pressure from Congress to show that both he and the entire Justice Department had not caved to political pressure from the White House.

In that setting, senior Justice Department and FBI officials gathered to discuss how to proceed with the investigation into Russian election interference.

McCabe’s notes from May 16 assert that both the recording and 25th Amendment remarks occurred during discussions on that day. McCabe’s senior counsel, FBI lawyer Lisa Page, also took notes of the discussions that largely track McCabe’s in sequence and import but are more detailed, according to people familiar with the discussions and the subsequent documents.

It is not clear why McCabe decided to memorialize meetings with his boss. Page took notes as McCabe’s in-house counsel.

Both McCabe’s and Page’s written accounts of the May 16 talks indicate that Rosenstein suggested candidates interviewing for the FBI job should wear a recording device to memorialize their discussions with the president, according to one person familiar with the documents. McCabe’s written account from that day also says Rosenstein raised the possibility of an effort to invoke the 25th Amendment, while Page’s accounts of the same discussion do not mention that, the person said. One person familiar with McCabe’s account said Rosenstein brought up the idea of recording Trump on two separate occasions that day.

According to other attendees at the meeting, the mention of secretly recording Trump occurred in a different context from the one McCabe and Page described. According to these people, McCabe was pushing for the Justice Department to open an investigation into the president.

During a conversation about how one would attempt to record any outlandish statements made by the president in private, Rosenstein responded with what one person described as a sarcastic comment along the lines of: “What do you want to do, Andy, wire the president?”

That person insisted the statement was not meant seriously. At one point in the May 16 discussions, another senior Justice Department official remarked that it was crazy that they were engaged in such conversations at all.

A third person familiar with the discussions said McCabe had privately told people months ago that Rosenstein suggested invoking the 25th Amendment and the idea of a senior law enforcement official wearing a wire while talking to Trump.

But a key discrepancy between the contradictory accounts revolves around the assertion by some that there were two key meetings that day attended by slightly different groups of officials — which could explain why McCabe’s account differs at times not just from that of Justice Department officials but also from Page’s.

A spokeswoman for Page declined to comment.

A Justice Department official who met frequently with both McCabe and Rosenstein said that in the months that followed, Rosenstein never broached either subject — the 25th Amendment or a possible wiretap involving the president.

The details of McCabe’s memos come at a time when a grand jury has been hearing evidence in a case of possible criminal false statements by McCabe.

McCabe was questioned by internal FBI investigators in 2017 about whether he had authorized anyone in October 2016 to talk to one of the reporters who wrote this news story. McCabe repeatedly denied doing so, but an inspector general report found evidence to the contrary. If prosecutors were to seek to charge McCabe, it is likely that they would have to get approval first from Rosenstein.

A key issue now is how the White House will respond to the revelations and disputes, as some high-profile conservatives argued that the new information justifies firing Rosenstein.

Fox News host Laura Ingraham tweeted that Rosenstein “needs to go. Today.”

The president’s son Donald Trump Jr. tweeted: “No one is shocked that these guys would do anything in their power to undermine” the president.

Eric Bolling, a former Fox News host who is in contact with the president, said that “if the allegation is true, absolutely fire Rosenstein. No one could find fault in that decision now.”

Bolling said a senior administration official reassured him Friday that White House officials “are going to expend quite a few resources to get to the bottom of the story.” Another Republican close to the White House said in an interview that the communications director, Bill Shine, wanted to gather more information before taking an aggressive stance on Rosenstein.

Sarah Ellison and Josh Dawsey contributed to this report.