Supporters of Syrian President Bashar al-Assad celebrated on Saturday after the Turkish army said it was seizing power from President Tayyip Erdogan, while Syrian rebels said the loss of a main regional backer would be a major blow to their struggle.
The government in Damascus has accused Erdogan, who said the coup would fail, of fuelling the Syrian conflict by supporting Islamist insurgents battling Damascus and allowing foreign jihadis to cross the border from Turkey into Syria.
Hundreds of cheering people took to the streets after midnight in Damascus and volleys of celebratory gunfire erupted in several districts of the Syrian capital.
Residents said convoys of cars were processing around the Mazzeh neighborhood, with people waving flags and shouting: "God, Syria and Bashar!". There were similar celebrations in other government-held cities.
A resident in the government-held part of the northern city of Aleppo said people believed that "Erdogan's fall is an announcement of the end of the crisis in Syria, given he is the one chiefly responsible for the crisis".
Another Aleppo resident said people were chanting for Erdogan to be held to account. A witness in the Jaramana district of Damascus said the celebratory gunfire was greater even than when Assad won re-election as president two years ago.
Erdogan said the coup attempt would be put down, and the prime minister and other officials said the elected government remained in place. Gunfire broke out in Istanbul and Ankara and television pictures showed scores of people gathered in city squares to show support for the Turkish government.
Syria's civil war, now in its sixth year, began as a peaceful uprising against Assad before morphing into a multi-sided conflict that is estimated to have killed several hundred thousand people and spawned an international refugee crisis.
Turkey alone is hosting 2.7 million refugees.
Turkish support
Numerous rebel groups operating under the banner of the Free Syrian Army have received aid via Turkey as part of a program of military support that has also been backed by the United States.
Turkey is also widely believed to have backed Islamist groups such as Ahrar al-Sham, although it has fiercely denied accusations that it has supported the Islamic State group.
"Of course what is happening in Turkey will have great implications on the situation in Syria," a senior Middle Eastern official with close ties to Damascus said, adding that the Turkish army had called for reconciliation in the region.
"Erdogan is going and Assad is staying."
He said it was not yet clear whether the coup had succeeded, or who was behind it. "But regardless of the circumstances, Erdogan’s policy and particularly in Syria led to his defeat."
Two Syrian opposition officials said they were worried about events in Turkey. "If the coup succeeds, that will have a negative impact on the revolution. Turkish support [for the rebels] was excellent compared to any other support," one of them said.
A second Syrian opposition official also said he was worried by the coup. "We look at it with great concern," he said.
A Syrian Kurdish source said it was too soon to judge the impact. "It is clear that the loser will be Daesh (Islamic State) and radical armed Islamist groups that enjoyed support of Erdogan and his party," the Kurdish source said. "The situation may reflect positively on the Syrian arena."
The Syrian Kurdish YPG militia has been battling Islamic State in northern Syria, and has also clashed with Turkey-backed rebels in and around Aleppo.
Erdogan's government, locked in a conflict with Turkey's own Kurdish minority that has flared up in recent months, is deeply suspicious of Kurdish aspirations in Syria.