TEHRAN — As rebel forces advance and longtime allies in Moscow distance themselves, Syria's most faithful friend is recalculating as well: Iranian officials and analysts say the Islamic Republic has launched a vigorous internal debate about how firmly it will continue to support Syrian President Bashar Assad.
On the surface, Iranian officials stick to the view that Assad remains in control, and they welcome his emissaries. In Friday sermons, clerics close to Ayatollah Ali Khamenei, Iran's supreme leader, accuse Israel and Western powers of plotting to bring Assad down.
But faced with the slow-motion collapse of Assad's regime, senior Iranian officials and clerics appear to be increasingly divided about how to respond. Under an Iranian peace plan unveiled this month, the Syrian president would remain in power through elections in 2014, although he could run again.
"The debate behind the curtains among experts and officials regarding the Syrian crisis is very hot," said an Iranian journalist with close ties to the office of Iranian President Mahmoud Ahmadinejad, who spoke on condition of anonymity. "Staunch support for Bashar Assad's regime is costing the Islamic Republic of Iran a lot."
Shiite Muslim Iran faces increasing isolation if Assad is overthrown by predominantly Sunni Muslim rebels supported by Iran's regional rivals in the Persian Gulf. Iran would lose a key part of an anti-Israel alliance it has nurtured since the 1980s. And at a time when it faces tough international sanctions because of its nuclear program, Iran risks complicating its problems by being regarded as an obstacle on Syria.
Focusing the blame for the "Syria debacle" could also affect Iran's next presidential election, scheduled for June.
As the fighting approaches the two-year mark, the slaughter of Syrian civilians and Assad's slipping territorial control have prompted subtle shifts in Iran's position.
Its six-point peace plan appears aimed largely at shielding Assad in the short term, while opening the way for his departure. Although roundly rejected by the Syrian opposition, it offers a window into Iranian thinking about a conflict that officials here once believed that Assad would win.
"Compare the content of [special envoy] Lakhdar Brahimi's six-point plan with Iran's six-point plan, and you will find very similar phrases and sentences," said an Iranian Foreign Ministry official, who spoke on condition of anonymity.
Brahimi, backed by the United Nations and the Arab League, has proposed a transitional government including rebels and government officials who would serve until elections. It remains unclear what role, if any, Assad would have. Although Russia is distancing itself, it hasn't demanded Assad's departure. Washington says the Syrian president must go.
"Both sides should come to the negotiating table," said the Iranian Foreign Ministry official. "Iran is sure it can keep Bashar in power until a 2014 presidential election, and then keep the state structure in Syria intact, with or without him."
The possibility that Assad, a member of the Alawite minority, a small offshoot of Shiite Islam, could fall shakes decades of Iranian assumptions about how to pursue its goals in the Middle East.
Since the 1980s, Iran and Syria have armed the Lebanese Shiite group Hezbollah and the Palestinian group Hamas, creating a united front against Israel and helping the two countries burnish their anti-Israeli credentials in the Muslim world.
When the Syrian uprising began in March 2011, it was largely a peaceful effort aimed at gaining greater democracy. But Assad met it with force, and over time the opposition developed into an armed insurrection with sectarian dimensions.
The battle is no longer about basic rights, but a struggle between Assad and the country's Sunni majority. Iran encouraged Assad to crush the resistance, not wishing to lose an important partner in the Arab world. It also was concerned about the rise of Syrian Sunnis who could fall under the influence of Turkey and Sunni monarchies of the Persian Gulf that are hostile to Iran.
Iran acknowledged sending Revolutionary Guard advisors to Syria, but then denied it. The Islamic Republic has been accused of arming Assad's security forces.
Among the consequences of the Syria conflict has been a crack in the anti-Israeli alliance. Hamas has broken with Damascus, and its relations with Iran have been strained by the fighting in Syria. Iran is also hard-pressed by economic sanctions over its nuclear program. Tension with the international community over its support for Assad could make it more difficult for Tehran to build the goodwill to cut a deal, if it chooses to do so.
Iran's military, religious and political elite are finding it hard to come to grips with the idea that their strategy of unconditionally backing Assad is no longer working. The realization that it was failing first came from academics and analysts working with the government, and has slowly permeated the halls of power.
"Unfortunately there is no other way to exit from this current crisis but the fall of President Bashar Assad," said Aziz Shahmohammadi, an analyst with close ties to the Foreign Ministry who has urged the Iranian leadership to prepare for the worst.
In addition to its peace plan, Tehran has explored talks with Syrian dissidents. The most prominent is Haytham Manna, who lives in Paris and represents the Damascus-based opposition umbrella group the National Coordination Committee for Democratic Change. The group, which emphasizes peaceful change, has been tolerated by Assad.
Iran has talked with Manna about heading a government while Assad stays on as president until elections, said Hossian Royarvan, a state television analyst on Middle Eastern affairs.
"Manna … has taken trips to Tehran several times and talked with Iranian officials. He wants the structure of state to remain intact as he thinks the structure is in the national interest, but he believes Bashar should quit," said Royarvan. "So Iran is talking with him and trying to find a solution for Syria through dialogue. There is no military solution."
The anxiety has crept into Iranian media, where censors had permitted no criticism or negative stories about Assad until about two months ago. Pro-government and opposition papers have both started running articles that forecast the end of Assad's rule.
On Tuesday, the pro-government paper Etellaat, whose editor is selected by Khamenei, published a story saying that the U.S. and Russia had crafted a joint plan for a transitional government in Syria, which both countries have denied. It included a call by a senior Hamas leader for Assad to be removed from power.
"In the beginning we supported the Syrian government extensively and ignored the opposition and even called them terrorists. It has cost Iran a lot among the Muslims," Abbas Abdi, a leader of the hostage-taking at the U.S. Embassy in 1979, said in the reformist daily Etemad last weekend.
Abdi said he believed Iran's new peace plan could have made a difference if it had come earlier, but now it was too little, too late. He called his piece: "Feeling sorry for the lost opportunity in Syria."
Special correspondents Mostaghim reported from Tehran and Sandels from Beirut. Times staff writer Ned Parker in Beirut contributed to this report.