Deputy Attorney General Rod Rosenstein suggested last year — in what could have been a joke — that he could secretly record President Trump to expose the turmoil in the White House.

And, according to the New York Times, which first reported the story, he also discussed asking cabinet members to invoke the 25th Amendment to remove the president from office.

Rosenstein made the suggestions in the spring of 2017 after Trump fired FBI chief James Comey, the paper reported Friday.

In the days after Comey was sacked over the Russia election meddling probe, Trump revealed classified information to Russian officials in the Oval Office and called the top G-man “a real nut job.”

It was also revealed at that time that Trump had asked Comey to pledge his loyalty in a one-on-one conversation in the White House, in which he also urged him to take it easy on national security director Mike Flynn.

Those developments, according to a report in the Washington Post, prompted then-FBI Deputy Director Andrew McCabe to push for an investigation into the commander-in-chief.

According to one person’s version cited by the DC paper, Rosenstein was only joking about recording the president.

“What do you want to do, Andy, wire the president?” Rosenstein responded to McCabe in what the paper called a sarcastic remark.

McCabe memorialized the conversation in memos that apparently were leaked to the Times.

Rosenstein made the remarks about the 25th Amendment in talks with other Justice Department and FBI officials, the Times reported, citing sources.

But another official at the meeting, ex-FBI lawyer Lisa Page, also wrote a memo about the discussion which did not mention any talk about the 25th Amendment, according to the Washington Post’s account.

Rosenstein shot also down the Times story in a statement.

“The New York Times’s story is inaccurate and factually incorrect,” he 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.”

The 25th Amendment to the Constitution spells out that a president can be declared “unable to discharge the powers and duties of his office” by a majority vote of the vice president and the cabinet.