WASHINGTON — Deputy Attorney General Rod Rosenstein discussed secretly recording President Donald Trump last year amid law enforcement concerns about chaos in the White House, according to people familiar with exchanges at the time. But one person who was present said Rosenstein was just being sarcastic.

Rosenstein's comments were first reported by The New York Times, which also said that he raised the idea of using the 25th Amendment to remove Trump as unfit for office.

The reports create even greater uncertainty for Rosenstein in his position at a time when Trump has lambasted Justice Department leadership and publicly humiliated both him and Attorney General Jeff Sessions.

More broadly, it's the latest revelation that could affect Robert Mueller, the special counsel investigating possible coordination between Russia and Trump's presidential campaign in 2016. Sessions recused himself from that issue soon after he took office, to Trump's dismay, and Rosenstein then appointed Mueller. With all that hanging in the air, Trump has resisted calls from conservative commentators to fire Sessions and Rosenstein and appoint someone who would ride herd more closely on Mueller or dismiss him.

At a campaign rally in Missouri on Friday night, Trump pledged to rid the Justice Department of its "lingering stench."

Trump told the rally that the department has some "great people" but also "some real bad ones." He said the bad ones are gone, "but there's a lingering stench and we're going to get rid of that, too."

It was unclear what Trump was referring to, and he didn't name names.

The reported conversation about possibly secretly recording the president took place at a tense May 2017 meeting during the tumultuous period that followed Trump's firing of FBI Director James Comey, a decision that upset many rank-and-file bureau agents and that the White House said was based on the Justice Department's recommendation.

Among the participants at the meeting was Andrew McCabe, the FBI official who was temporarily elevated to director after Comey's firing and who documented conversations with senior officials, including Rosenstein, in memos that have been provided to special counsel Mueller as part of his Trump-Russia investigation.

The Justice Department released an email from one attendee who said Rosenstein's "statement was sarcastic and was never discussed with any intention of recording a conversation with the president."

Rosenstein himself called the Times story "inaccurate and factually incorrect."

"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."