WASHINGTON — President Trump acknowledged Thursday that he had not recorded his conversations with James B. Comey, the F.B.I. director he fired amid the Justice Department’s investigation into the Trump campaign’s possible ties to Russia.

“With all of the recently reported electronic surveillance, intercepts, unmasking, and illegal leaking of information,” Mr. Trump said in a pair of tweets shortly before 1 p.m., “I have no idea …. whether there are ‘tapes’ of my conversations with James Comey, but I did not make, and do not have, such recordings.”

The Run-Up

The podcast that makes sense of the most delirious stretch of the 2016 campaign.

Mr. Trump’s statement brings to an end speculation that began shortly after accounts emerged about the president’s exchanges with Mr. Comey — speculation the president himself began with a post on Twitter that warned the former F.B.I. director that there might have been tapes of their conversations.

Mr. Trump appeared at the time to be referring to an article in The New York Times reporting that he had asked Mr. Comey to pledge loyalty during a dinner at the White House shortly after the inauguration, only to be rebuffed by the F.B.I. director, who considered the request inappropriate.

The president’s Twitter messages on Thursday left open the possibility that the conversations may have been taped without his knowledge. But they largely confirmed the suspicions of outsiders that Mr. Trump had been leveling a baseless threat at Mr. Comey on May 12, when he wrote, “James Comey better hope that there are no ‘tapes’ of our conversations before he starts leaking to the press!”

Some legal experts have said that Mr. Trump’s threat could be used in an obstruction of justice case against him, since it could be interpreted as putting pressure on Mr. Comey not to discuss their conversations about the F.B.I.’s Russia investigation.

This month, Mr. Comey testified in detail about those conversations, saying the president had appealed to him on multiple occasions not to pursue an investigation of his former national security adviser, Michael T. Flynn, and his alleged links to Russian officials.

Asked during the Senate hearing whether he worried about the existence of tapes, Mr. Comey replied, “Lordy, I hope there are tapes.”

Mr. Trump’s announcement, however expected, distracted from the released on Thursday of the Republican health care legislation in the Senate.

“The president’s statement via Twitter is extremely clear,” said the deputy press secretary, Sarah Huckabee Sanders. “I don’t have anything to add to the statement.”

Ms. Sanders said that Mr. Trump had promised to deliver an answer on the existence of the tapes by the end of the week, and that he had delivered on that promise. She also said she did not believe his intention in his original Twitter post about tapes had been to intimidate Mr. Comey.