Earlier on Sunday, Rouhani had told a gathering of Iranian diplomats that Trump shouldn't play with the lion's tail because that would "only lead to regret."
"America should know that peace with Iran is the mother of all peace, and war with Iran is the mother of all wars," said Rouhani, quoted by the state news agency IRNA.
The latest tit-for-tat exchange comes as Iranian officials threaten to block the Strait of Hormuz, a strategic choke point for oil shipments in the Persian Gulf region, in retaliation for proposed U.S. sanctions.
James Stavridis, retired four-star U.S. Navy admiral and NATO supreme allied commander, called the Strait of Hormuz a "flashpoint" for a potential conflict.
"Here's what drove that [Trump's] tweet: The Iranians are talking about closing that waterway and choking off oil if they are sanctioned. If they do that, and they've done it before, can you spell gas prices rising and disruption in the oil markets?" Stavridis said Monday on MSNBC's "Morning Joe."
"It is a very dangerous game of chicken to play," he added, saying that the U.S. must mend relationships with allies and partners before going "into another war in the Middle East."
Stavridis, dean of Tufts University's Fletcher School, said in an interview with CNBC on Monday that if Iran were to close the Strait of Hormuz, "the U.S. and our Arabian Gulf Allies would be able to open it in a matter of days."
In a blistering speech on Sunday, Secretary of State Mike Pompeo launched a rhetorical assault on Iran's regime, saying it "resembles the Mafia more than a government."
Pompeo, in a California speech to a largely Iranian-American audience, dismissed Rouhani and Foreign Minister Mohammad Javad Zarif, who negotiated the 2015 nuclear deal with the United States and other countries, as "merely polished front men for the ayatollahs' international con artistry."