WASHINGTON — Deputy Attorney General Rod Rosenstein denied a New York Times report Friday that he floated the idea of using the 25th Amendment to remove President Donald Trump as unfit for office and suggested secretly recording the president to expose the chaos in the administration.

The Times cited several people, who were not named, who described the episodes that came in the spring of 2017 after FBI Director James Comey was fired. The newspaper’s sources also included people who were briefed on memos written by FBI Deputy Director Andrew McCabe.

Rosenstein is a frequent target of Trump’s attacks and the story could add to the uncertainty about his future at the Justice Department, despite his denial.

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

A person who was in the room when the comment was made, and provided a statement through the Justice Department, said Rosenstein’s comment was “sarcastic” and that he “never discussed any intention of recording a conversation with the president.”

The newspaper reported that Rosenstein, frustrated with the hiring process for a new FBI director, offered to wear a “wire” and secretly record the president when he visited the White House. He also suggested that McCabe and other officials who were interviewing to become the next FBI director could also perhaps record Trump, the newspaper reported.

McCabe’s lawyer, Michael Bromwich, said in a statement that his client had 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.”

McCabe’s memos, which were later turned over to special counsel Robert Mueller’s office, had remained at the FBI until McCabe was ousted in January and McCabe doesn’t know how any reporters could’ve obtained those memos, Bromwich said.

Rosenstein has been a target of Trump’s ire since appointing Robert Mueller as a Justice Department special counsel to investigate potential coordination between Russia and the Trump campaign during the 2016 presidential election.

He chose Mueller for the job one week after he laid the groundwork for the firing of Comey by writing a memo that criticized Comey’s handling of the FBI’s investigation into Hillary Clinton’s email server. The White House initially held up that memo as justification for Comey’s firing, though Trump himself has said he was thinking about “this Russia thing” when he made the move.

As deputy attorney general, Rosenstein oversees Mueller’s work and has made two public announcements of indictments brought by the special counsel — one against Russians accused of hacking into Democratic email accounts, the other against Russians accused of running a social media troll farm to sway public opinion.

On Friday, Trump’s eldest son, Donald Trump, Jr., tweeted the Times’ story and said: “Shocked!!! Absolutely Shocked!!! Ohhh, who are we kidding at this point? No one is shocked that these guys would do anything in their power to undermine @realdonaldtrump.”