WASHINGTON — Deputy Attorney General Rod Rosenstein was joking when he discussed wearing a wire to secretly record President Donald Trump and does not believe Trump should be removed from office through the use of procedures outlined in the Constitution's 25th Amendment, according to Justice Department officials who requested anonymity to discuss the conversation.

The officials were responding to a New York Times report that Rosenstein, in the tumultuous spring of 2017, had discussed with other Justice and FBI officials the possibility of recruiting members of Trump's Cabinet to declare him unfit for the job and that he offered to wear a recording device during conversations with the president.

In a May, 16, 2017 meeting at a secure facility at the Justice Department — one week after Trump fired FBI Director James Comey — Rosenstein was arguing with Andrew McCabe, then the acting director of the FBI, about the president, according to a senior Justice Department official.

"Well, what do you want me to do, Andy, wear a wire?" Rosenstein asked at the meeting, which also included FBI lawyer Lisa Page and four career DOJ officials, according to the senior official. One of the career civil servants was Scott Schools, who would later go on to sign off on the firing of McCabe, the official said.

This official and a source who was in the room characterized Rosenstein's remark as sarcastic.

The senior official further said that the reference to invoking the Constitution to remove Trump comes from a post-meeting memo written by McCabe that said the deputy attorney general "raises 25th amendment" and that Page's notes from the same meeting do not contain any similar note.

People who have discussed the matter with McCabe, however, say he remembers Rosenstein as being serious in making the comment about wearing the wire.

Rosenstein said Friday that "there is no basis" for members of the Cabinet to use the Constitution's 25th Amendment to remove President Donald Trump from office.

"The New York Times story is inaccurate and factually incorrect," he said in a written statement released by the Justice Department. "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."

Later Friday night, Rosenstein released a second statement pushing back on the story. “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," he said.

The White House had no immediate comment on the story, but Trump allies outside the administration began sounding a death knell for Rosenstein's tenure at Justice.

Rod Rosenstein must be fired today. @realDonaldTrump — Laura Ingraham (@IngrahamAngle) September 21, 2018

The president did not directly mention Rosenstein during a campaign rally in Springfield, Mo., Friday night, though he made an oblique reference to current headlines.

"Just look at what is now being exposed in our Department of Justice and the FBI," Trump said before highlighting the departures of FBI officials he believed had conspired against him. "We have great people in the Department of Justice ... but you've got some really bad ones. You see what's happened at the FBI. They're all gone. They're all gone. They're all gone."

Pausing for applause, Trump finished the thought: "But there's a lingering stench, and we're going to get rid of that, too."

Trump has long been furious at Justice Department officials, including Rosenstein and Attorney General Jeff Sessions, for their handling of allegations that Trump's campaign conspired with Russia to help him with the presidency and their failure to more fully investigate his allegations that anti-Trump officials within the law enforcement community abused their power to try to frame him.

Sessions recused himself from Russia-related matters, and, along with Rosenstein, provided a bill of particulars against then-FBI Director James Comey in advance of Trump firing Comey. But after Rosenstein appointed special counsel Robert Mueller to lead the Russia investigation, Trump fumed.

"I am being investigated for firing the FBI Director by the man who told me to fire the FBI Director!" Trump tweeted in June 2017. "Witch Hunt."

This summer, two top Trump allies, Republican Reps. Mark Meadows of North Carolina and Jim Jordan of Ohio, introduced articles of impeachment against Rosenstein over his handling of House GOP inquiries into the use of a special federal court that ordered the wiretapping of Trump campaign adviser Carter Page, Republican requests for internal Justice Department and FBI documents and his own involvement in related matters that they say amount to a "conflict of interest."

That effort, which was opposed by House Speaker Paul Ryan, R-Wis., died over the summer, in part because House Republicans realized that a hypothetical Senate removal proceeding could interfere with that chamber's effort to confirm a new Supreme Court Justice.

The Times based its reporting on sources who "were briefed either on the events themselves or on memos written by F.B.I. officials, including Andrew G. McCabe, then the acting bureau director, that documented Mr. Rosenstein’s actions and comments."

McCabe responded to the story through an attorney, Michael R. Bromwich.

"Andrew McCabe 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," Bromwich said in a statement. "When he 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. 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."

In April, NBC reported that Rosenstein had told colleagues he expected to be fired.