MOSCOW/ANKARA Syria would be divided into informal zones of regional power influence and Bashar al-Assad would remain president for at least a few years under an outline deal between Russia, Turkey and Iran, sources say.
Such a deal, which would allow regional autonomy within a federal structure controlled by Assad's Alawite sect, is in its infancy, subject to change and would need the buy-in of Assad and the rebels and, eventually, the Gulf states and the United States, sources familiar with Russia's thinking say.
"There has been a move towards a compromise," said Andrey Kortunov, director general of the Russian International Affairs Council, a think tank close to the Russian Foreign Ministry.
"A final deal will be hard, but stances have shifted."
Assad's powers would be cut under a deal between the three nations, say several sources. Russia and Turkey would allow him to stay until the next presidential election when he would quit in favour of a less polarising Alawite candidate.
Iran has yet to be persuaded of that, say the sources. But either way Assad would eventually go, in a face-saving way, with guarantees for him and his family.
"A couple of names in the leadership have been mentioned (as potential successors)," said Kortunov, declining to name names.
Nobody thinks a wider Syrian peace deal, something that has eluded the international community for years, will be easy, quick or certain of success. What is clear is that President Vladimir Putin wants to play the lead role in trying to broker a settlement, initially with Turkey and Iran.
That would bolster his narrative of Russia regaining its mantle as a world power and serious Middle East player.
"It's a very big prize for them if they can show they're out there in front changing the world," Sir Tony Brenton, Britain's former ambassador to Moscow, told Reuters. "We've all grown used to the United States doing that and had rather forgotten that Russia used to play at the same level"
If Russia gets its way, new peace talks between the Syrian government and the opposition will begin in mid-January in Astana, the capital of Kazakhstan, a close Russian ally.
The talks would be distinct from intermittent U.N.-brokered negotiations and not initially involve the United States.
That has irritated some in Washington.
"So this country that essentially has an economy the size of Spain, that's Russia, is strutting around and acting like they know what they are doing," said one U.S. official, who declined to be named because of the subject's sensitivity.
"I don't think the Turks and the Russians can do this (political negotiations) without us."
Foreign and defence ministers from Russia, Turkey and Iran met in Moscow on Dec. 20 and set out the principles they thought any Syria deal should adhere to.
Russian sources say the first step is to get a nationwide ceasefire and then to get talks underway. The idea would then be to get Gulf states involved, then the United States, and at a later stage the European Union which would be asked, maybe with the Gulf states, to pick up the bill for rebuilding.
The three-way peace push is, at first glance, an odd one.
Iran, Assad's staunchest backer, has provided militia fighters to help Assad, Russia has supplied air strikes, while Turkey has backed the anti-Assad rebels.
Putin has struck a series of backroom understandings with his Turkish counterpart Tayyip Erdogan to ease the path to a possible deal, several sources familiar with the process say.
Moscow got Iran to buy into the idea of a three-way peace push by getting Turkey to drop its demands for Assad to go soon, the same sources said.
"Our priority is not to see Assad go, but for terrorism to be defeated," one senior Turkish government official, who declined to be named, said.
"It doesn't mean we approve of Assad. But we have come to an understanding. When Islamic State is wiped out, Russia may support Turkey in Syria finishing off the PKK."
Turkey views the YPG militia and its PYD political wing as extensions of the outlawed Kurdistan Workers Party (PKK), which has long waged an insurgency in its largely Kurdish southeast.
"Of course we have disagreements with Iran," said the same Turkish official. "We view some issues differently, but we are coming to agreements to end mutual problems."
Aydin Sezer, head of the Turkey and Russia Centre of Studies, an Ankara-based think tank, said Turkey had now "completely given up the issue of regime change" in Syria.
Turkey's public position remains strongly anti-Assad however and Foreign Minister Mevlut Cavusoglu said on Wednesday a political transition with Assad was impossible.
Brenton, Britain's former ambassador, said Moscow and Ankara had done a deal because Moscow had needed Turkey to get the opposition out of Aleppo and to come to the negotiating table.
"The real flesh in the game the Turks have, and the fear they have, is of an autonomous Kurdistan emerging inside Syria that would have direct implications for them," he said.
Ankara launched an incursion into Syria, "Operation Euphrates Shield", in August to push Islamic State out of a 90-km (55-mile) stretch of frontier territory and ensure Kurdish militias did not gain more territory in Syria.
The shifting positions of Moscow and Ankara are driven by realpolitik. Russia doesn't want to get bogged down in a long war and wants to hold Syria together and keep it as an ally.
Turkey wants to informally control a swathe of northern Syria giving it a safe zone to house refugees, a base for the anti-Assad opposition, and a bulwark against Kurdish influence.
The fate of al-Bab, an Islamic State-held city around 40 km (25 miles) northeast of Aleppo, is also a factor. Erdogan is determined that Turkish-backed rebels capture the city to prevent Kurdish militias from doing so.
Several sources said there had been an understanding between Ankara and Moscow that rebels could leave Aleppo to help take al-Bab.
Iran's interests are harder to discern, but Ali Akbar Velayati, Iran's Supreme Leader Ayatollah Ali Khamenei's top adviser, said Aleppo's fall might alter a lot in the region.
By helping Assad retake Aleppo, Tehran has secured a land corridor that connects Tehran to Beirut, allowing it to send arms to Hezbollah in Lebanon.
Russian and Western diplomatic sources say Iran would insist on keeping that corridor and on Assad staying in power for now. If he did step down, Tehran would want him replaced with another Alawite, which it sees as the closest thing to Shia Islam.
Iran may be the biggest stumbling block to a wider deal.
Iranian Defence Minister Hossein Dehghan has said Saudi Arabia must not take part in talks because of its stance on Assad - Riyadh wants the Syrian leader to step down.
Scepticism about the prospects for a wider deal abounds.
Dennis Ross, an adviser to Democratic and Republican administrations, now at the Washington Institute for Near East Policy, said he did not think a deal would bring peace to Syria.
"I doubt this will end the war in Syria even after Aleppo," Ross told Reuters. "Assad's presence will remain a source of conflict with the opposition."
(Additional reporting by Maria Tsvetkova in Moscow, Bozorgmehr Sharafedin in Beirut, William Maclean in Dubai, Ece Toksabay, David Dolan, Arshad Mohammed, Phil Stewart and Yeganeh Torbati in Washington; Editing by Janet Lawrence)