WASHINGTON — President Trump said on Wednesday that he wants to keep in place the deputy attorney general, Rod J. Rosenstein, amid speculation about Mr. Rosenstein’s future, which was thrust into doubt by revelations that he had discussed secretly taping the president and removing him from office.

The two were scheduled to meet on Thursday to discuss Mr. Rosenstein’s comments, which were revealed in a New York Times article last week, prompting Mr. Rosenstein to tell senior White House aides over the weekend that he was considering resigning.

[Read: Rod Rosenstein Suggested Secretly Recording Trump and Discussed 25th Amendment]

Asked during a news conference at the United Nations whether he planned to fire Mr. Rosenstein, Mr. Trump said, “I would certainly prefer not doing that.”

Mr. Trump added: “We’ve had a good talk. He said he never said it, he said he doesn’t believe it. He said he has a lot of respect for me, and he was very nice, and we’ll see.”