(CNN) -- In public at least, the message was defiant. Beleaguered Syrian President Bashar al-Assad, sitting alongside Iran's intelligence chief, proclaimed Tuesday "the determination of the people and government of Syria to cleanse the country of terrorists."
His Iranian visitor, Saeed Jalili, responded, "What is happening in Syria is not an internal issue but a conflict between the axis of resistance on one hand and regional and global enemies of this axis on the other." Jalili's comment was made public by the Syrian news agency that al-Assad's government runs.
It's a familiar theme for the Iranians, who have cast events in Syria as part of a much broader ideological battle. Supreme Leader Ayatollah Ali Khamenei has similarly characterized events in Syria as a "war between the front of hegemony and the front of resistance."
Ayham Kamel of Eurasia Group believes the Iranians must be alarmed that the tide is running fast against al-Assad.
"Iran probably has excellent information regarding Assad's position. That information would make clear that Iran is increasingly likely to lose its only ally in the region, greatly reducing its strategic reach," he says.
The last thing Iran wants is a Sunni-dominated Syria that abandons the "axis" -- especially as the rebels' main supporters are Iran's Persian Gulf rivals: Qatar and Saudi Arabia.
"How can those who have never held an election in their country be advocates of democracy?" Jalili asked in Damascus, with a less than oblique dig at the Gulf monarchies. Assad also blasted as "unacceptable" that certain foreign countries were "supporting terrorism in Syria" through arming the rebels.
Iran is al-Assad's last regional ally, and Western intelligence officials believe the Islamic Republic has provided technical help such as intelligence, communications and advice on crowd control and weapons as protest in Syria has morphed into resistance.
A United Nations panel reported in May that Iranian weapons destined for Syria but seized in Turkey included assault rifles, explosives, detonators, machine guns and mortar shells.
Iran's Foreign Minister acknowledged Wednesday that some of the 48 Iranians kidnapped last weekend by the Free Syrian Army near Damascus were former military personnel.
"Some retired individuals from the (Revolutionary) Guards and army were dispatched to Syria to make a pilgrimage," Foreign Minister Ali Akbar Salehi told the official Iranian news agency, a statement that will likely be seized upon by the rebels as confirmation that Iran is directly aiding the al-Assad regime.
Syria and Iran vs. Israel
Syria also matters to Iran because it is the main conduit to the Shi'ite militia Hezbollah in Lebanon, the proxy through which Iran can threaten Israel with an arsenal of short-range missiles.
In 2009, the top U.S. diplomat in Damascus disclosed that Syria had begun delivery of ballistic missiles to Hezbollah, according to official cables leaked to and published by WikiLeaks.
"Syria's actions have created a situation in which miscalculation or provocative behavior by Hezbollah could prove disastrous for Syria and the broader region," the diplomat wrote.
The regional picture that was so favorable to Iran a few years ago -- as events in Iraq moved in its favor and those in neighboring Afghanistan moved against the Western alliance -- is now much more challenging. International sanctions imposed chiefly by the United States and Europe are biting, renewed political violence is destabilizing Iraq, and Iran's relationship with Turkey has eroded badly.
Not so long ago, Iran and Turkey were on good terms. The government of Recep Tayyip Erdogan tried to be the honest broker in Iran's confrontation with the West over its nuclear program; both governments worried about Kurdish separatism; and Turkey's guiding principle was 'zero problems with neighbors.'
Erdogan said this week at a meeting of his Justice and Development Party: "When no one else was by its side, Turkey stood by Iran, despite everything. Turkey defended its right to nuclear energy."
Not any more. Erdogan has been infuriated by Iran's attempts to paint Turkey as conspiring with the West on Syria. This week, Iran's chief of staff Hassan Firouzabadi accused Turkey of helping the "belligerent objectives" of Western powers, prompting the Turkish Foreign Ministry to condemn "groundless accusations and extremely inappropriate threats" of Iranian officials.
Erdogan joined in. "On Syria, once again I ask the Iranians: Does defending a regime that kills its brothers, and I think it has reached 25,000 by now, suit our values?"
Playing on differences
Iranian Foreign Minister Ali Akbar Salehi traveled to Turkey Tuesday in an effort to mend that fence. He left with what the Turkish Foreign Minister called a "frank and friendly" message about intemperate language.
Iran and Turkey are shaping up for the next phase of the struggle for Syria, according to Michael Young, Opinion Editor at the Daily Star in Beirut. And it is likely to be a Syria where central control is much weaker in the face of sectarian and clan fissures.
"If the Alawis are afraid and fall back on their heartland, there too you're going to have a situation where a new central government in Damascus will have to wrestle with a state that is not strongly unified," Young told the New York-based Council on Foreign Relations.
"In that context, it will create openings for the Iranians to play on differences."
Turkey will be working for the opposite outcome, wary that Syria's Kurds might seek common cause with its own restive Kurdish minority and concerned that prolonged instability will spill into Lebanon and across Syria's long and porous border with Turkey.
If its rhetoric is accepted at face value, Iran may be ready to step up support for al-Assad. But does it have the resources? As Ayham Kamel at Eurasia Group notes: "Sanctions are biting, oil revenues have been compressed, inflation is rampant, and reserves are limited." But backing al-Assad, at least in the short term, may be an overriding imperative.
The United States says Iran is intensifying its support for the Assad regime. And most analysts expect at least more Iranian cash and more expertise to be made available.
"The diversion of perhaps tens of millions of dollars or euros in cash would certainly assist Assad's government as its foreign exchange reserves dwindle," says Kamel. The provision of additional arms and intelligence is also likely in the near term, he says.
Less predictable, analysts say, is whether Hezbollah will of its own accord or at Iran's behest put its considerable military expertise at Assad's service. Iranian intelligence chief Jalili met Hezbollah leader Hassan Nasrallah before going to Damascus.
Nasrallah has nailed his colors to the mast. He said last month that the four senior Syrian officials killed in a bomb blast in Damascus were "martyrs" and boasted that the rockets Hezbollah had fired at Israel in 2006 were made in Syria.
Hezbollah's nightmare is a hostile Israel on one side and a hostile Sunni Syria on the other, even if its internal position in Lebanon is secure. But both it and Iran are now trying to peer into a future as gloomy as it is opaque.