Deputy Attorney General Rod Rosenstein rejected a report from anonymous sources that he considered using the 25th Amendment to the Constitution to oust President Trump.

Using anonymous sources who were never quoted directly, the New York Times reported Friday that Rosenstein talked about secretly recording Trump last year, and mulled trying to force him out using language in the 25th Amendment to the Constitution that details how a president can be removed when he isn't able to serve.

But Rosenstein rejected that theory in a statement that was included in the story.

“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.”

A spokesperson for the Justice Department also gave the Times a statement from an anonymous person who was with Rosenstein when he suggested recording Trump, and claimed Rosenstein was just being sarcastic when he talked about wearing a wire.

Although Rosenstein criticized the article, a statement by former FBI Deputy Director Andrew McCabe, also released Friday, appeared to confirm that McCabe's memos were used the validate the Times' story.

In a statement provided by his attorney, Michael Bromwich, McCabe said he has 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."

"When [McCabe] was interviewed by the Special Counsel more than a year ago, he gave all of his memos -- classified and unclassified — to the special counsel's office," said Bromwich. "A set of those memos remained at the FBI at the time of his departure in late January 2018. He has no knowledge of how any member of the media obtained those memos."

Sources familiar with the matter told the Washington Post that McCabe’s memos do detail Rosenstein’s talks of the 25th Amendment, and also recording Trump.

But former FBI lawyer Lisa Page also wrote her own memo of the meeting where the proposition of invoking the 25th Amendment was allegedly discussed, but no mention of it was included, per the Washington Post.

Robert Mueller, who Rosenstein appointed in May 2017 to lead the federal government’s investigation into Russian election interference and possible connections to the Trump campaign, has received McCabe's contemporaneous memos.

Nonetheless, the Times said Rosenstein discussed the idea of recording Trump with other Justice Department and FBI officials just after he had been at his post for two weeks in the spring of 2017, according to unnamed sources who were briefed on the conversations or were privy to memos detailing the remarks.

The discussions were allegedly held after Trump fired FBI Director James Comey, and after Rosenstein starting overseeing the federal Russia probe looking at Russian interference in the 2016 election and whether the Trump campaign colluded with the Kremlin. The investigation is also examining if Trump obstructed justice when he fired Comey.

The story said Rosenstein told former FBI Deputy Director Andrew McCabe he could possibly get Attorney General Jeff Sessions and then-Secretary of Homeland Security John Kelly on board with invoking the 25th Amendment to oust the president.

Multiple media reports have indicated that Trump has had a tense relationship with Rosenstein, and even suggested Trump has considered removing him from his position. But Trump claimed in August that he had a "great relationship” with Rosenstein.

Trump has historically railed against the Justice Department and in particular, has slammed the special counsel’s Russia investigation and characterized it was a “witch hunt.”

The President's son Donald Trump Jr. tweeted the story and said: "No one is shocked that these guys would do anything in their power to undermine ⁦@realDonaldTrump⁩."

Though the tense relationship between Trump and Sessions is the one that often makes the news, Trump and Rosenstein have had issues of their own. In February, Trump brushed aside a question if he had confidence in Rosenstein, telling reporters: “You figure that one out.”

Trump was upset at Rosenstein after he was named in a memo released by House Republicans alleging abuses by the Justice Department and FBI in obtaining surveillance warrants.

However, later the White House said there were no plans to fire Rosenstein.

Then in April, it was reported that Trump was mulling firing Rosenstein after the FBI raided the offices of his longtime personal lawyer Michael Cohen.

But it is McCabe, who was fired by Sessions in March due to accusations of media leaks, who has suffered a handful of Twitter attacks from Trump.

“Spent very little time with Andrew McCabe, but he never took notes when he was with me,” Trump said in March about the memos. “I don’t believe he made memos except to help his own agenda, probably at a later date. Same with lying James Comey. Can we call them Fake Memos?”

In April, Trump called him a liar on Twitter following a report by the Justice Department Inspector General that was critical of McCabe.

“DOJ just issued the McCabe report — which is a total disaster. He LIED! LIED! LIED! McCabe was totally controlled by Comey - McCabe is Comey!! No collusion, all made up by this den of thieves and lowlifes!” said the president.

McCabe has disputed the inspector general report’s findings, but remains under criminal investigation by the US Attorney's Office in DC.