Trump in recent weeks had hinted about renewing attacks on Iran after the US midterm elections on Tuesday.
But after a speech at the Washington Reflecting Pool on Monday, he indicated he might be thinking otherwise.
Asked by reporters if he was considering striking Iran after the midterms, Trump replied "no".
The Iran war is a leading cause of high fuel prices that are weighing on voters and Trump is under pressure to end the conflict.
Iranian negotiators were in Doha on Sunday for a third consecutive day of talks with Qatari mediators aimed at pushing for a deal to end the war.
Trump said on Monday he believed Iran wanted to make a deal and that such an agreement "could happen".
Officials in Tehran said contact between Iran and the US to end the eight-month war were continuing after days of Iranian talks with Qatari mediators ended with altered proposals but no breakthrough.
"Consultations through mediators are very intensive. We have presented our conditions and proposals and everything depends on the political rationality of Washington," Iranian Foreign Minister Abbas Araqchi said in comments carried by state media outlet IRNA.
"If the US accepts our conditions, the Strait of Hormuz will be reopened and negotiations will be resumed," he said.
Iranian President Masoud Pezeshkian said the country's supreme leader had granted "certain authorities" to the government in regards to peace talks, state media reported.
US Vice President JD Vance said there had been "a number of good conversations with the Iranians".
"Look, the president and I both feel pretty good about the prospects for potentially coming to a negotiated settlement. We're going to keep on working at it," he said.
Trump stressed his bottom-line demand that Iran not possess a nuclear weapon.
"We're not going to allow Iran ever to have a nuclear weapon, and they understand that. They've understood that and they've said it even recently," Trump said.
Trump talked about Iran in a speech that was billed as his closing argument for voters ahead of US midterm elections on Tuesday.
with AP