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

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,…