The US Department of Defense confirmed that yesterday, Iran launched more than a dozen rockets against the US military facilities of al-Asad base in western Iraq and Erbil in the north.
Introducing his statement at the White House, Trump said: "As long as I'm president of the United States Iran will never be allowed to have a nuclear weapon."
He went on to say US forces are "prepared for anything," but for now, "Iran appears to be standing down".
"Iran appears to be standing down, which is a good thing for all parties concerned and a very good thing for the world," he said.
Trump said no Americans were harmed in yesterday's attack.
World powers must send a clear and unified message to Tehran, he said.
He said Iran has been the "leading supporter of terrorism" and that the country had "threatened the civilised world".
He called Iranian general Qasem Soleimani "the world's top terrorist", and said Soleimani's hands were "drenched in blood".
Trump said the US assassination of Qasem Soleimani sent a message to terrorists: "If you value you're own life, you will not threaten the lives of our people."
The US will impose "additional punishing sanctions" on Iran, which has already faced hardship from US sanctions under the Trump administration, he said.
"The fact that we have this great military and equipment, however, does not mean we have to use it. We do not want to use it. American strength, both military and economic, is the best deterrent," he said.
Trump stopped short of making any direct threat of military action against Iran. He urged world powers including Russia and China to abandon the 2015 nuclear accord with Iran and work toward a new agreement.
"We must all work together toward making a deal with Iran that makes the world a safer and more peaceful place," he said.
He added that he would ask Nato to "become much more involved" in the Middle East.
Iraq's foreign ministry has summoned the Iranian ambassador in Baghdad over the missile attacks.
In a statement, the ministry said Iraq rejected "the attacks on camps housing Iraqi and non-Iraqi forces, and we deem them to be a violation of our sovereignty".
"Iraq is an independent state and... its internal security is its priority. We will not allow it to become a battlefield," the statement added.