The United States called on all parties in Turkey to support President Tayyip Erdogan's government against a coup attempt on Friday as world leaders expressed concern about the upheaval in a NATO member country that bridges Europe and the Middle East.
President Barack Obama and Secretary of State John Kerry spoke by phone and gave their support to Erdogan after Turkey's military said it had seized power.
"The President and Secretary agreed that all parties in Turkey should support the democratically-elected government of Turkey, show restraint, and avoid any violence or bloodshed," the White House said in a statement.
U.S. government sources said a coup attempt was under way in Turkey but it was unclear who was prevailing.
Erdogan vowed that the attempted coup would be put down and crowds answered his call to defy a curfew order and take to the streets to support him.
Erdogan has ruled Turkey since 2003 and if the coup against him is successful it would be one of the biggest shifts in the Middle East in years.
The sharp-tongued Erdogan is often accused of authoritarian rule at home and has frequently fallen out with neighbors such as Israel, Iran, Russia and the European Union as he tried to carve out a greater role for Turkey in the Middle East.
But Turkey is a key ally for Washington which has often pointed to the country as a good example of a free-market democracy in the Muslim world, even though it has a poor record on freedom of expression.
Relations between Erdogan and the Obama administration have deteriorated in recent years as Washington complained that Ankara was not doing enough to fight Islamic State. Erdogan chafes at U.S. support for Syrian Kurdish rebels, who have close ties to Kurdish guerrillas fighting in Turkey.
The United States uses the Incirlik air base in Turkey to launch strikes against Islamic State, which holds territory in Syria and Iraq. It said those operations had not been affected by the upheaval.
The State Department told U.S. citizens in Turkey to "shelter in place and stay indoors."
U.S. Democratic presidential candidate Hillary Clinton said she supported Turkey's civilian government and was following the events in Turkey "with great concern."
EU seeks restraint
EU foreign policy chief Federica Mogherini called for calm in Turkey.
"Call for restraint and respect for democratic institutions," she tweeted from an EU-Asia summit in Mongolia.
Ties between Turkey and Germany - vital partners in efforts to curb mass migration to Europe - have been strained since the Bundestag passed a resolution in June branding the 1915 massacre of Armenians by Ottoman forces as a genocide. Ankara recalled its ambassador and threatened unspecified retaliation.
Iran, a Shi'ite Muslim nation which has long been a regional rival to Sunni majority Turkey, said on Friday it was deeply concerned about the crisis in the neighboring country.
"Stability, democracy and safety of Turkish people are paramount. Unity and prudence are imperative," Foreign Minister Mohammad Javad Zarif said on his Twitter account.
In Syria, hundreds of cheering government supporters took to the streets of Damascus early on Saturday and celebratory gunfire erupted after Turkey's army said it seized power from Erdogan, one of Syrian President Bashar al-Assad's main foes in the region.
Residents said convoys of cars circled around the Mazzeh district of the Syrian capital, with people waving flags and shouting: "God, Syria and Bashar!". There were similar celebrations in other government-held cities.
Assad's government has accused Erdogan of fuelling Syria's five-year conflict by supporting Islamist insurgents battling Damascus and allowing foreign jihadis to cross the border from Turkey into Syria.
The Kremlin said it was gravely concerned about events in Turkey, and that it had instructed officials to help Russian nationals in Turkey return home at the earliest opportunity.
Kremlin spokesman Dmitry Peskov told reporters on a conference call that President Vladimir Putin was being kept constantly updated on the situation in Turkey.
Japanese Prime Minister Shinzo Abe said he was concerned about the situation in Turkey.
"I have instructed my chief cabinet secretary to collect information and ensure the safety of Japanese citizens (in Turkey)," Abe told reporters in Mongolia where he is attending a regional summit.
Turkey closed the three border crossings with Bulgaria, the Bulgarian Foreign Ministry said, reiterating its appeal to Bulgarians to avoid any travels to the country's southern neighbor.
Britain's new foreign minister, Boris Johnson, said he was "very concerned" by events in Turkey, where many thousands of British and other European holiday-makers were spending summer vacations.