Rather than toppling Turkey's strongman president, a failed military coup that left more than 250 dead appears to have bolstered Recep Tayyip Erdogan's immediate grip on power and boosted his popularity.
Turkey plays a key role in the USA -led coalition fighting the Islamic State group. Explosions and gunfire erupted throughout the night.
President Erdogan, then in the south-west resort of Marmaris, made a televised address via his mobile phone, urging people to take to the streets to oppose the uprising.
Prime Minister Binali Yildirim described the coup attempt as a "black stain on Turkish democracy", with 265 people killed and 1440 wounded. While condemning the coup bid, German Chancellor Angela Merkel said the plotters had to be dealt with "under the rule of law".
Erdogan has cooperated with Washington in the fight against ISIS, but relations have been rocky with USA officials criticizing his increasing authoritarianism, Turkey's support for Islamist opposition groups fighting Syrian President Bashar al-Assad and the slow pace in sealing Turkey's border with Syria to foreign fighters. He has shaken up the government, cracked down on dissidents, restricted the news media and renewed fighting with Kurdish rebels.
And crowds answered the call. Thousands gathered in major cities singing and waving Turkish flags while others held prayers in support of Erdogan and chanted "God is great".
Government supporters marched through Ankara as cars honked in apparent approval.
Turkey's interest in rapprochement with Israel have not changed as a result of the attempted coup: Ankara will still want to improve its diplomatic position in the region; it will still want to cooperate with Israel on security and intelligence matters as much as possible; and it will still want to send supplies to Gaza and build a desalination plant and hospital there.
Turkey's North Atlantic Treaty Organisation allies lined up to condemn the coup attempt.
Turks have not seen such scenes since 1980 when the military led by General Kenan Evren ousted the government and many had no desire to revive these memories.
Regarding the Middle East, Dugin said he foresees a significant change in the policies of both Russian Federation and Turkey.
No named military officer claimed responsibility for the actions.
Anadolu Agency said the government dismissed 2,745 judges across Turkey.
The official was not authorized to discuss the matter publicly so spoke anonymously. For many months we have sent requests to the USA concerning Fethullah Gulen. Erdogan has vowed Gulen will be punished for his role in the overthrow attempt.
Ankara recently classified his movement as a terrorist organization. Washington has never found any evidence particularly compelling previously.
However, the image of the United States as a beacon of democracy, the motif carried under the banner of both the American flag and North Atlantic Treaty Organisation forces, would be ultimately exposed as a myth if Erdogan undertakes a purge of all opposition moving for mass imprisonment or a return of the death penalty.
Earlier Erdogan urged the U.S. to extradite Gulen claiming Turkey never turned down an extradition request from Washington for "terrorists".
He said: "'Government should be won through a process of free and fair elections, not force", he said. "I categorically deny such accusations", Gulen said in a statement.
Late Saturday, Defense Minister Fikri Isik said state authorities were in full control of all areas in Turkey following the coup attempt but warned that authorities would remain vigilant.
The Turkish media on Saturday cited two military figures as leading the coup attempt.
In two out of four previous coups in Turkey since 1960, the top military brass were involved and were able to use the chain of command to ensure success.
Turkey is a key partner in US -led efforts to defeat the Islamic State group, and has allowed American jets to use its Incirlik air base to fly missions against the extremists in nearby Syria and Iraq.
Turkish authorities said that 2,839 military were detained after the coup attempt. But Cavusoglu said there would be no problems regarding operations at the base. Emrah Gurel, Bram Janssen and Cinar Kiper in Istanbul, Mucahit Ceylan in Ankara and Jill Lawless in London also contributed.
Soguel reported from Istanbul.