Forces loyal to Turkey's government fought on Saturday to crush the last remnants of a military coup attempt which collapsed after crowds answered President Tayyip Erdogan's call to take to the streets and dozens of rebels abandoned their tanks.
More than 160 people were killed, including many civilians, after a faction of the armed forces tried to seize power using tanks and attack helicopters. Some strafed the headquarters of Turkish intelligence and parliament in the capital, Ankara, and others seized a major bridge in Istanbul.
Erdogan accused the coup plotters of trying to kill him and launched a purge of the armed forces, which last used force to stage a successful coup more than 30 years ago.
"They will pay a heavy price for this," said Erdogan, who also saw off mass public protests against his rule three years ago. "This uprising is a gift from God to us because this will be a reason to cleanse our army."
One government minister said some military commanders were still being held hostage by the plotters. But the government declared the situation fully under control, saying 161 people had been killed and 2,839 had been rounded up from foot soldiers to senior officers, including those who had formed "the backbone" of the rebellion.
A successful overthrow of Erdogan, who has ruled the country of about 80 million people since 2003, would have marked one of the biggest shifts in the Middle East in years, transforming a major U.S. ally while war rages on its border.
However, a failed coup attempt could still destabilize a NATO member that lies between the European Union and the chaos of Syria, with Islamic State bombers targeting Turkish cities and the government also at war with Kurdish separatists.
Erdogan, who had been holidaying on the southwest coast when the coup was launched, flew into Istanbul before dawn on Saturday and was shown on television outside Ataturk Airport.
Addressing a crowd of thousands of flag-waving supporters at the airport later, Erdogan said the government remained at the helm, although disturbances continued in Ankara.
Erdogan, a polarizing figure whose Islamist-rooted ideology lies at odds with supporters of modern Turkey's secular principles, said the plotters had tried to attack him in the resort town of Marmaris.
"They bombed places I had departed right after I was gone," he said. "They probably thought we were still there."
Erdogan's AK Party has long had strained relations with the military, which has a history of mounting coups to defend secularism although it has not seized power directly since 1980.
While loved by his supporters, Erdogan's conservative religious views have also alienated many ordinary Turks who accuse him of authoritarianism. Police used heavy force in 2013 to suppress mass protest demanding more freedom.
SMART PHONE ADDRESS
In a night that sometimes verged on the bizarre, Erdogan frequently took to social media even though he is an avowed enemy of the technology when his opponents use it, frequently targeting Twitter and Facebook.
Erdogan addressed the nation via a video calling service, appearing on the smart phone of a CNN Turk reporter who held it up to a studio camera so viewers to the network could see him.
He said the "parallel structure" was behind the coup attempt -- his shorthand for followers of Fethullah Gulen, a Muslim cleric whom he has repeatedly accused of trying to foment an uprising in the military, media and judiciary.
Gulen, who lives in self-imposed exile in the United States, once supported Erdogan but became a nemesis. The pro-Gulen Alliance for Shared Values said it condemned any military intervention in domestic politics.
Gunfire and explosions had rocked both Istanbul and Ankara through the night after soldiers took up positions in both cities and ordered state television to read out a statement declaring they had taken power. However, by dawn the noise of fighting had died down considerably.
About 50 soldiers involved in the coup surrendered on one of the bridges across the Bosphorus Strait in Istanbul after dawn on Saturday, abandoning their tanks with their hands raised in the air. Reuters witnesses saw government supporters attack the pro-coup soldiers who had surrendered.
Earlier, around 30 pro-coup soldiers had surrendered their weapons after being surrounded by armed police in Istanbul's central Taksim square.
They were taken away in police vans as a fighter jet repeatedly screeched overhead at low altitude, causing a boom that shook surrounding buildings and shattered windows.
Neighboring Greece arrested eight men aboard a Turkish military helicopter which landed in the northern city of Alexandroupolis on Saturday, the country's police ministry said, adding that they had requested political asylum.
LAWMAKERS IN HIDING
The coup began with warplanes and helicopters roaring over Ankara and troops moving in to seal off the bridges over the Bosphorus Strait that links Europe and Asia in Istanbul.
Maritime authorities shut Istanbul's Bosphorus Strait to transiting tankers "for security and safety" reasons, shipping agent GAC said.
In the early hours of Saturday, lawmakers were hiding in shelters inside the parliament building, which was being fired on by tanks. Smoke rose up from nearby, Reuters witnesses said. An opposition deputy told Reuters parliament was hit three times and that people had been wounded.
A senior Turkish official said later on Saturday attacks on the parliament had "largely stopped."
A Turkish military commander also said fighter jets had shot down a helicopter used by the coup plotters over Ankara. State-run Anadolu news agency said 17 police were killed at special forces headquarters there.
Momentum turned against the coup plotters as the night wore on. Crowds defied orders to stay indoors, gathering at major squares in Istanbul and Ankara, waving flags and chanting.
"We have a prime minister, we have a chief of command, we're not going to leave this country to degenerates," shouted one man, as groups of government supporters climbed onto a tank near Ataturk airport.
U.S. Secretary of State John Kerry said he phoned the Turkish foreign minister and underlined "absolute support for Turkey's democratically elected, civilian government and democratic institutions".
European Council President Donald Tusk called for a swift return to Turkey's constitutional order, saying tensions there could not be resolved by guns.
Erdogan has had often prickly relations with the EU, which worried about some of his actions including raids on Turkish media. French Foreign Minister Jean-Marc Ayrault said Paris "hopes that Turkish democracy will emerge reinforced by this test and that fundamental liberties will be fully respected."
Flag carrier Turkish Airways resumed flights on Saturday, Erdogan said. Malaysia Airports, the operator of Sabiha Gokcen International Airport, Istanbul's second airport, said it would continue to process flights in and out of Turkey.
Soldiers took control of TRT state television, which announced a countrywide curfew and martial law. An announcer read a statement on the orders of the pro-coup faction that accused the government of eroding the democratic and secular rule of law. Turkey would be run by a "peace council" that would ensure the safety of the population, the statement said.
TRT went off the air shortly afterwards. It resumed broadcasting in the early hours of Saturday.
Turkey is one of the main backers of opponents of Syrian President Bashar al-Assad in that country's civil war, host to 2.7 million Syrian refugees and launchpad last year for the biggest influx of migrants to Europe since World War Two.
Turkey has suffered numerous bombings and shootings this year, including an attack two weeks ago by Islamists at Ataturk airport that killed more than 40 people, as well as those staged by Kurdish militants.
After serving as prime minister from 2003, Erdogan was elected president in 2014 with plans to alter the constitution to give the previously ceremonial presidency far greater executive powers.
Turkey has enjoyed an economic boom during his time in office and has dramatically expanded its influence across the region. However, opponents say his rule has become increasingly authoritarian.
© 2016 Thomson Reuters. All rights reserved.
Get Charisma's best content delivered right to your inbox! Never miss a big news story again. Click here to subscribe to the Charisma News newsletter.
Great Fall Specials from CHARISMA:
#1 What's at stake with this election ... EVERYTHING!: Click Here to get the truth about what's at stake and what could happen if you don't make your voice heard.
#2 Fall Book Bundles: Click Here to view all our bundles and save up to 72%! Prayer, Holy Spirit, Anointing, and more.
#3 FREE eCourses by CHARISMA: Click Here to view all the free courses. Topics include Fear, Forgiveness, Holy Spirit, Supernatural, and How to Hear God.