A Foreign Ministry spokesman, Bahram Qassemi, said on Thursday, “It is a shame that the U.S. government, instead of thanking the Iranian nation for their continued fight against terrorism, keeps repeating unfounded claims and adopts unwise policies that are effectively helping terrorist groups.”
Mr. Flynn also made clear that the challenge to Iran extended beyond the missile test, holding Tehran responsible for an attack on a Saudi warship by Houthi rebels in Yemen, who the United States says are supported by Iran. Iran denies that, but the remark was taken as a veiled warning about Iran’s support of regional proxies like Hezbollah in Lebanon and Shiite militias in Iraq.
“The Trump administration condemns actions by Iran that undermine security, prosperity and stability throughout the Middle East and place American lives at risk,” Mr. Flynn said.
Later, Mr. Trump said on Twitter that “Iran is rapidly taking over Iraq,” its neighbor, even after “the U.S. squandered three trillion dollars there. Obvious long ago.”
During the presidential campaign, Mr. Trump spoke favorably of unpredictability in foreign policy, pointing to the Reagan presidency as an example of the benefits of keeping opponents off balance. Since taking office, he has been good to his word, and Iranians have noticed.
“Trump is not predictable for Americans, not for Europeans and not for us,” said Nader Karimi Joni, an analyst close to the government of President Hassan Rouhani. “He and his team are not trustworthy. They will not honor any agreement. Nothing good is coming from this.”
Certainly not for Mr. Rouhani, a moderate who came to power promising to ratchet down tensions with the West, cinch a nuclear deal and get Iran’s economy moving again. Now, all those goals are in jeopardy, and Mr. Rouhani’s re-election this spring is far from assured.
On Thursday, an aide to Iran’s supreme leader, Ayatollah Ali Khamenei, called Mr. Trump’s remarks “hollow rants” and said that they “would bring losses for his country’s national interest.” And a former foreign minister, Ali Akbar Velayati, said that Iran would continue to test missiles.
Mr. Rouhani has called Mr. Trump a political novice. But there is little doubt that the clerics have been thrown off balance. One analyst with access to government deliberations said that hard-liners in Iran were confused and did not know how to deal with the situation. Some in the establishment are opting for the same rhetoric and tactics they used under Mr. Obama, but in reality, this is uncharted territory, he said.
Mr. Trump has filled his foreign policy team with advisers like Mr. Flynn and the secretary of defense, Jim Mattis, who consider Iran to be the greatest cause of instability in the Middle East, if not the world, and who say the Obama administration treated Tehran with kid gloves.
When Iran test-fired a missile on Sunday, it did not announce the launching on state television, something the country’s leadership usually likes to do to send a message to its adversaries. Missile tests are commonplace in Iran, but Sunday’s muted approach was clearly meant to test the Trump administration’s reaction.
Mr. Flynn did not elaborate what he meant by saying Iran was on notice. But in Iran, many agreed that whatever it meant, it did not bode well.
“When they say we are put on notice, it means we should be very careful,” said Soroush Farhadian, a reformist journalist. “We need self-restraint. Our military men need to be prevented from making blunders. One incident in the Persian Gulf can lead to conflict right now.”
In recent months, speedboats belonging to the Islamic Revolutionary Guards Corps have made a practice of aggressively approaching United States naval vessels, then veering off. During the campaign, Mr. Trump vowed that if they tried that under his watch, he would “blow them out of the water.” There have been no reported incidents since Mr. Trump took office.
Ayatollah Khamenei was uncharacteristically quiet during a visit on Thursday to the martyr’s graves, usually a moment for brief remarks about current affairs. Mr. Rouhani’s position is more delicate. He has been promoting ties with the United States. And though he executed the nuclear agreement with the blessing of Ayatollah Khamenei, the supreme leader has also been critical of the deal.
Having tied his political future to the nuclear agreement and having promised to normalize relations with the West, Mr. Rouhani is rapidly losing influence, analysts say. He now finds himself faced with an American travel ban for his citizens and an American president who thinks the nuclear pact “is a really, really bad deal.”
Hard-liners are deeply critical of Mr. Rouhani and are increasingly dismissing him as a figure of the past, a man who may have been the right answer in the Obama era but is the wrong one now. Many expect the next president to be a far more combative figure, in the mold of the former president, Mahmoud Ahmadinejad.
“For this Trump, we need to talk and act tough,” said Hamidreza Taraghi, a hard-line analyst. “Mr. Rouhani speaks beautiful words, but they are empty. We can deal with Mr. Trump. He is a businessman, but we should not compromise.”