(CNN) -- The specter of U.S. military intervention in Syria prompted dire warnings from Iran's supreme leader, new president, and top diplomat, according to Iran's Fars News Agency.
Talk of U.S. military action against Syria's Bashar al-Assad regime emerged after what rebels say was a deadly chemical attack by the regime that killed civilians last week.
Since then, a flurry of comments and activity seems to be laying the groundwork for a military strike against the regime. At the same time, United Nations inspectors are looking for evidence that chemical weapons were used in the Damascus suburbs.
The mounting tension has brought warnings from leaders in Iran, a longtime supporter of the al-Assad regime.
"Starting this fire will be like a spark in a large store of gunpowder, with unclear and unspecified outcomes and consequences," Supreme Leader Ayatollah Ali Khamenei told Iranian Cabinet members in Tehran on Wednesday.
"The U.S. threats and possible intervention in Syria is a disaster for the region and if such an act is done, certainly, the Americans will sustain damage like when they interfered in Iraq and Afghanistan."
President Hassan Rouhani, also speaking to the Cabinet, said people in the Middle East and the world won't accept "a new war" and deplored threats to use force.
"Any adventurism in the region will pose irreparable dangers to the stability of the region and the world and will merely lead to the spread of extremism and terrorism in the region," Rouhani said.
He called on the U.N. inspectors to carry out unbiased investigations to identify the culprits behind the chemical weapons use in Syria, and said, "Each and every measure should be taken with respect to the sensitive situation of the region, rapid ending of the internal crisis, and prevention of extremism in the region and in the framework of the international rules and regulations."
Foreign Minister Mohammad Javad Zarif likened a possible attack to a return to "the Middle Ages."
Zarif condemned any possible military intervention in Syria on Wednesday, warning of "graver conditions" should strikes be carried out.
After last week's attack, new dynamics
The Syrian conflict grew into a full-blown civil war after a fierce government crackdown started on civilian protesters in March 2011.
As the crisis worsened, the United States and other Western countries embarked on diplomacy and shunned force to end the crisis, which has left more than 100,000 people dead and millions of civilians displaced, according to the United Nations.
But the attack on the outskirts of Damascus last week appeared to have changed the dynamics and put the possibility of force front and center.
The al-Assad government, Syrian rebels say, used chemical weapons in the attack and killed more than 1,300 people.
U.S. President Barack Obama said last year that the movement or use of chemical weaponry in Syria would represent a "red line" in the conflict.
The United States has deployed warships off the coast of Syria, and Western powers say a strike on Syria could be imminent after reports of a chemical weapons attack that killed hundreds.
Along with Iran, Russia has criticized the idea of a strike in Syria.
Russian Foreign Minister Sergey Lavrov said there's no proof yet Syria's government is behind last week's chemical attack. The Russia Foreign Ministry accused Washington of trying to "create artificial groundless excuses for military intervention."
"The West handles the Islamic world the way a monkey handles a grenade," Russian Deputy Prime Minister Dmitry Rogozin said on Twitter.
Iran and Syria: Allies for years
Iran's support for Syria has been "unwavering," according to Karim Sadjadpour, who wrote an essay about the relationship for the Combating Terrorism Center at West Point.
"Mutual contempt for Saddam Hussein's Iraq brought Syria and Iran together in 1980 and mutual fear and loathing of the United States and Israel has helped sustain their alliance," he wrote.
He noted that Syria has been Iran's "only consistent ally since the 1979 Islamic resolution" and has been a "geographic thoroughfare" to Hezbollah, the Lebanese Shiite militia -- "one of the crown jewels of the Iranian revolution."
Iran is the world's most populous Shiite Muslim nation and is led by Shiite religious authorities. The Syrian government is dominated by Alawites, a Shiite offshoot, and the rebels are dominated by Sunnis.
"Iranian motivations in keeping the al-Assad regime in power are also driven by deep concerns about the composition of a post-Assad government. Given Syria's overwhelming Sunni Arab demographic majority, Iran fears the prospect of Syria being rendered a Sunni sectarian regime aligned with Saudi Arabia or the United States and hostile to Shi`a Iran," Sadjadpour said.
What happens if the regime "loses Damascus"? Should Iran "preserve a sphere of influence by supporting a predominantly Alawite militia representing only a small fraction of Syrian society, or to befriend the Sunni rebels poised to wield authority in Damascus?"
"Contrary to conventional wisdom, what is most important for Iran is not the sectarian composition of Syria's future leaders, but a like-minded ideological worldview premised on resistance to the United States and Israel," Sadjadpour wrote.