The alleged use of chemical weapons by President Bashar Al Assad's regime against his own people is acutely awkward for Syria's sole regional champion, Iran, where the leadership appears divided over what line to take.
The spectre of chemical weapons haunts the Iranian people. Saddam Hussein's forces used poisoned gas against Iran to devastating effect during the Iran-Iraq war in the 1980s. Tehran estimates that 100,000 Iranian soldiers and civilians were exposed to Iraqi chemical weapons, mostly mustard and nerve gases.
"Many of the innocent people of Syria have been injured and martyred by chemical agents and this is unfortunate," Mr Rouhani told the ISNA news agency.
"We completely and strongly condemn the use of chemical weapons, because the Islamic Republic of Iran is itself a victim of chemical weapons," he said.
The chemical weapons attack in Syria also could weaken Iran's hand in forthcoming high stakes nuclear talks with six world powers, including the United States, known as the P5+1, analysts said.
And Tehran's continued support for the Syrian regime threatens to undermine a promised drive by Iran's moderate new president, Hassan Rouhani, to mend relations with its Arabian Gulf neighbours, which support the Syrian opposition.
"Syria has become a serious liability for Iran, both in terms of its position in the Middle East and also in its dealings with the P5+1," Meir Javedanfar, an Iranian-born lecturer at the Interdisciplinary Centre in Herzliya, Israel, said. "Iran is being seen as backing a side that is using WMDs [weapons of mass destruction]."
The main and defiant message from Tehran, apparently passed down by the supreme leader, Ayatollah Ali Khamenei, is that Syrian "terrorists" - its code-word for rebels - were responsible for the poison gas attacks in Syria last Wednesday, which opposition activists say have killed more than 1,000 civilians in the world's worst chemical weapons atrocity in a quarter of a century.
Syrian opposition activists counter that the gas strikes were launched by Mr Assad's forces and have killed more than 1,000 civilians in the world's worst chemical weapons atrocity in a quarter of a century.
However, Mr Rouhani, while condemning the use of chemical weapons in Syria, has pointedly declined to say which side he believed was responsible.
He noted on Saturday Iran's suffering from chemical weapons attacks during its war with Iraq and urged the international community to "use all its power to prevent the use of such weapons in all places".
Citing declassified CIA documents, Foreign Policy magazine said yesterday that the United States had provided Iraq with intelligence on preparations for an Iranian offensive during the Iran-Iraq war in the 1980s even though it knew Baghdad would respond with chemical weapons
"As Iraqi attacks continue and intensify the chances increase that Iranian forces will acquire a shell containing mustard agent with Iraqi markings," a top secret CIA report said in November 1983.
Unhappy with Mr Rouhani's apparently deliberate ambiguity about the Syrian crisis, Fars news agency, which is affiliated to Iran's hardline Revolutionary Guards, put words into his mouth with a misleading headline on a story that read: "Iranian president strongly condemns terrorists' use of chemical weapons in Syria."
It was not the first time Mr Rouhani was off-message on Syria in the view of the Iranian establishment. Shortly after his landslide election victory against hardline competitors in June, he highlighted Iran's inconsistent approach to regional affairs.
Mr Rouhani noted that the Islamic Republic had criticised the Bahraini government's crackdown of Shiite anti-government protesters while retaining its support for Mr Al Assad, despite his regime's violent response to the uprising against his rule.
"We should not describe as oppressive brutal actions in an enemy country while refraining from calling the same actions oppressive if they take place in a friendly country," he said. "Brutality must be called brutality."
But this weekend a senior Iranian military commander warned the United States it would be crossing a "red line" if it retaliated militarily against Syria for its alleged use of chemical weapons. Massoud Jazayeri, deputy chief of Iran's armed forces, said there would be "severe consequences for the White House".
He stopped short of saying whether Iran would be involved in any such retaliation, suggesting instead that any anti-American blowback would come from Syrians and ordinary Arabs across the Middle East.
"The terrorist war under way in Syria was planned by the United States and reactionary countries in the region against the resistance front [against Israel]", Mr Jazayeri said. "Those who add fire to the oil will not escape vengeance from the people."
Meanwhile, Mr Javedanfar said that should there be a US-led military strike against Syria, Iran would appear weak because its "red line" was crossed with impunity. "And that will have consequences for Iran's deterrent posture in the region."
UN weapons experts yesterday inspected the site in Syria where chemical weapons were used. Whatever their findings, Iran seems committed to stand by Mr Al Assad - at least for now.
Ali Akbar Velayati, a veteran top foreign policy adviser to Iran's supreme leader, Ayatollah Ali Khamenei, proclaimed last week: "We strongly believe that the government in Syria will remain in power."
He added: "Iran won't hesitate to help the Syrian people and the Syrian government to defend their rights and their territory and their territorial integrity."
But, said Mr Javedanfar, Iran will jettison its support for Mr Al Assad if Tehran realises the Syrian dictator is "sinking and unsalvageable".