Deputy Attorney General Rod Rosenstein in spring 2017 suggested secretly recording President Trump and recruiting cabinet members to remove him from office, former FBI Acting Director Andrew McCabe wrote in memos at the time, assertions that Mr. Rosenstein disputed on Friday.

One person in the room when Mr. Rosenstein mentioned secret recordings said that he was clearly sarcastic and didn’t seriously consider it, according to an email from the person provided by the Justice Department on Friday.

The New York Times first reported about the matter on Friday, citing people briefed about the events and about memos written by top Federal Bureau of Investigation officials, including Mr. McCabe. The existence of the McCabe memos was confirmed to The Wall Street Journal by a person familiar with them. Mr. Rosenstein called the Times report “inaccurate and factually incorrect.”

Around the time that Mr. Trump fired then-FBI Director James Comey, Mr. Rosenstein told Mr. McCabe that he might be able to persuade top administration officials to invoke the 25th Amendment, which allows cabinet members to deem the president incapable of performing his duties, the Times reported.

In a statement, Mr. 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.”