Iran fired off warnings that US-led military strikes against Syria will spell "disaster for the region", but its leaders have stopped short of threatening retaliation if its sole Arab state ally is attacked.
The bluster from Iran, like that from Russia, is aimed at averting an attack on Syria, rather than indicating that either country plans to engage in war on President Bashar Al Assad's behalf, analysts said.
The presidents of Iran and Russia agreed in a telephone call late on Wednesday to work towards stopping military action, Iranian state TV reported. Iranian president Hassan Rouhani was quoted as saying that "military action will bring great costs for the region" and "it is necessary to apply all efforts to prevent it."
"Iran doesn't have many options right now. It's under pressure from sanctions over its nuclear programme and can't afford to escalate the situation," Scott Lucas, an Iran expert at Birmingham University in England, said.
At least initially, any US-led attack on Syria could undermine Iran's moderate new president, who has indicated he is keen to mend fences with Washington to ease crippling sanctions imposed over Iran's disputed nuclear programme.
Mr Rouhani faces opposition from hardline forces, some of who have already called for Tehran to respond to any Western strike on Syria.
"Iran will condemn any strike against Syria but sees no reason to react militarily to what it considers would be folly by the US," Farideh Farhi, an Iran scholar at the University of Hawaii, said.
That especially will be the case if, as seems likely, US military action against Syria is limited to a "half-hearted" barrage of cruise missile strikes "designed to punish but not remove Assad from power," she added.
Iran's hardline supreme leader, Ayatollah Ali Khamenei, proclaimed on Wednesday that US intervention in Syria would be a "disaster" for the region, and increase hatred against America.
"This lighting of a fire is like a spark in a gunpowder magazine whose dimensions and consequences are unknown," he said.
But the Iranian regime as a whole has not endorsed that rhetoric, and the Syrian regime's alleged use of chemical weapons has been acutely uncomfortable for Iranian authorities.
Iran, which was subjected to devastating poison gas attacks by Saddam Hussein's Iraq - with US connivance — during the 1980s, has blamed the attack on Syrian rebels.
Tehran has condemned the use of such munitions by any group and says it has pressed Damascus to assist UN inspectors who are in the country conducting an inquiry.
"If Assad has used chemical weapons, he's done none of his allies such as Iran and Russia any favours," Trita Parsi, the president of the National Iranian American Council, an advocacy group, said.
"I find it very unlikely that Iran will get itself involved in any military confrontation with the US over this."
Self-preservation is one reason analysts say a direct reaction would be unlikely.
"The first law of the Iranian regime is not to expose its outdated military to attack unless it's a matter of vital national interest," a Western diplomat who has served in Iran, said.
"Tehran will be very cautious about retaliating on Syria's behalf in ways that could bring down the wrath of the Americans or Britain on them," he said, adding however that this logic could change if Western strikes hit Iranian targets in Syria, such as the country's embassy in Damascus.
Still, US-led strikes against Damascus, are likely to increase tensions.
"The dangers of escalation are definitely there," the Western diplomat said. "Iran could send more Hizbollah forces to Syria," he said, referring to the Iranian-backed Lebanese Shiite militia that has entered the civil war to fight on the side of Mr Al Assad.
"Russia could decide to provide the Syrians with powerful S-300 anti-aircraft missiles," he added.
Amid the rising tensions over Syria, top UN official Jeffrey Feltman visited Iran earlier this week, reportedly to discourage an Iranian military response to US-led action on Syria.
Mr Feltman, a former US ambassador to the UN, also urged Iran to use its "influence and leadership in the region" to persuade the Syrian government to attend planned but long delayed peace talks this fall with Syrian opposition groups in Geneva.
Iran is keen to attend the much-postponed summit in Switzerland to ensure that its interests in Syria are protected, even if Mr Assad is himself removed from office.
Iran would like to see a regime in Damascus that retains the current government's hostile stance toward Israel and that allows Tehran to use Syrian territory to arm Hizbollah.