In a series of characteristically bombastic tweets posted on Friday, the president said he was ready to “retaliate last night on 3 different sights (sic) when I asked, how many will die”.
He said a general told him 150 people, and he cancelled the strikes as “not proportionate to shooting down an unmanned drone”.
Trump also took the opportunity to attack Barack Obama and the nuclear deal which he pulled out of in 2018.
Ongoing tensions between the US and Iran escalated with the downing of an American surveillance drone over the Strait of Hormuz on Thursday.
Trump suggested that shooting down the drone – which has a wingspan wider than a Boeing 737 – was a foolish error rather than an intentional escalation, suggesting he may have been looking for some way to avoid a crisis.
The swift reversal was a stark reminder of the serious risk of military conflict between US and Iranian forces as the Trump administration combines a “maximum pressure” campaign of economic sanctions with a build-up of American forces in the region.
Earlier on Friday, Iranian officials told Reuters that Tehran had received a message from Trump warning that a US attack on Iran was imminent but saying that he was against war and wanted talks on a range of issues.
News of that message, delivered through Oman overnight, came shortly after the New York Times reported that Trump had called off air strikes targeting Iranian radar and missile batteries at the last minute.
“In his message, Trump said he was against any war with Iran and wanted to talk to Tehran about various issues,” one of the officials told Reuters, speaking on condition of anonymity.
“He gave a short period of time to get our response but Iran’s immediate response was that it is up to Supreme Leader (Ayatollah Ali) Khamenei to decide about this issue.”
A second Iranian official said: “We made it clear that the leader is against any talks, but the message will be conveyed to him to make a decision.
“However, we told the Omani official that any attack against Iran will have regional and international consequences.”
Khamenei has the last say on all state matters and has ruled out any talks with Washington while Tehran is under sanctions.
Iran shot down the drone after weeks of festering tension amidst a spate of attacks on oil tankers in the Gulf region.
In his initial response on Thursday, Trump said he was not eager to escalate a stand-off with Iran over its nuclear and ballistic missile activities and support for proxies in various Middle East conflicts.
He said the unmanned drone might have been shot down in error by someone who was acting “loose and stupid”, though added: “This country will not stand for it.”