In this July 13, 2018, file photo, Deputy Attorney General Rod Rosenstein speaks during a news conference at the Department of Justice in Washington. Rosenstein is denying a report in The New York Times that he suggested last year that he secretly record President Donald Trump in the White House to expose the chaos in the administration. Rosenstein says the story is “inaccurate and factually incorrect.” (AP Photo/Evan Vucci, File)

The announcement capped a tense few hours after officials said Rosenstein had told White House officials over the weekend that he was willing to resign in the wake of revelations that he once suggested secretly recording President Donald Trump.

On Monday morning, White House officials said Rosenstein had offered to resign to quell the controversy, while Justice Department officials said he had no intention of resigning but was heading to the White House with the expectation he would be fired.

After Rosenstein met with White House Chief of Staff John Kelly, he proceeded to a meeting of senior administration officials, indicating that at least for the moment, he was staying on the job.

Rosenstein has been overseeing the investigation of special counsel Robert Mueller, who is looking into Russian interference in the 2016 presidential campaign and whether any Trump associates conspired with those efforts. It wasn’t immediately clear what Rosenstein’s departure might mean for that investigation, or who would oversee it, although the role could naturally fall to Solicitor General Noel Francisco.

Amid the conflicting accounts of whether Rosenstein would resign, be fired, or still be in his job at the end of the day, it was clear that his position at the Justice Department had never been more tenuous.

One Trump adviser said that the president has not been pressuring Rosenstein to leave, but that his resignation was a topic of private discussions all weekend. The person said Rosenstein had expressed to others that he should resign because he “felt very compromised” and the controversy hurt his ability to oversee the Russia inquiry, said a person close to Trump.

Rosenstein has been the target of Trump’s public ire and private threats for months, but uncertainty about his future deepened after it was revealed Friday that memos written by Andrew McCabe when he was FBI deputy director said that in May 2017, Rosenstein suggested secretly recording the president and trying to muster support for invoking the 25th Amendment to replace him.

McCabe memorialized discussions he had with Rosenstein and other senior officials in the stress-packed days immediately following James Comey’s firing as FBI director. At that moment, the FBI was deeply suspicious of Rosenstein’s role in the decision, and the Justice Department was worried that it had lost credibility with Congress for giving Trump a memo that said the FBI needed new leadership.

Others involved in those May 2017 discussions said Rosenstein’s comments about secretly recording the president were sarcastic and came as McCabe was pressing the Justice Department to investigate the president’s firing of Comey as possible obstruction of justice.

In statements Friday, Rosenstein denied that he ever seriously contemplated secretly recording the president or pursuing the 25th Amendment to replace the president, as was first reported by The New York Times.

“The New York Times’ 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.”

For more than a year, Trump’s public and private comments about the Russia investigation have led to speculation and concern that Rosenstein could be fired.

Rosenstein, a Republican and career Justice Department official who had served under presidents George W. Bush and Barack Obama, came into office on a wave of bipartisan support, but Comey was fired soon afterward, and Rosenstein was immediately drawn into fierce partisan battles surrounding the Russia inquiry.

Rosenstein became deputy attorney general in April 2017 and assumed oversight of Mueller’s investigation after Attorney General Jeff Sessions, who did not disclose to Congress that he had met during the 2016 campaign with Russia’s ambassador to the United States, recused himself from the inquiry involving the election.

Just days into his job as the No. 2 official at the Justice Department, Rosenstein wrote a memo criticizing Comey’s handling of the earlier investigation of Hillary Clinton’s use of a private email server for government work when she was secretary of state.

The White House used Rosenstein’s memo to justify Comey’s firing. Days later, Rosenstein appointed Mueller, and the special counsel has since been examining the firing of Comey and whether it was part of a pattern of behavior that amounts to obstruction of justice by the president.

Rosenstein’s decisions, including the renewal of a warrant to surveil a former Trump campaign adviser, have prompted furious Twitter outbursts from the president. “I am being investigated for firing the FBI Director by the man who told me to fire the FBI Director!” he has written.

Trump has repeatedly dismissed the Mueller inquiry as a “witch hunt” designed to delegitimize his election victory and undermine his presidency.

Some of the president’s most outspoken supporters have railed against Rosenstein. Rep. Paul Gosar, R-Ariz., at one point described the deputy attorney general and former Justice Department officials as “traitors to our nation.”

Democrats and many Republicans have warned Trump against any attempt to assume control of or shut down Mueller’s investigation, either by firing Rosenstein to appoint a pliable successor, or dismissing Mueller directly. And they have said the president risks sparking a constitutional crisis if he tries to derail the inquiry.

“I’d like to make something crystal clear to the president. Mr. President, any attempt to remove Rod Rosenstein will create the exact same constitutional crisis as if you fired Special Counsel Mueller,” Senate Minority Leader Charles Schumer, D-N.Y., said earlier this year. “Don’t do it. Do not go down this path. For the sake of our country, we plead with you. Don’t put this country through a constitutional crisis.”

– – –

The Washington Post’s Sari Horwitz, Matt Zapotosky and Robert Barnes contributed to this report.