ANKARA- Turkish President Recep Tayyip Erdogan told the nation Saturday that his government is in charge after a coup attempt brought a night of explosions, air battles and gunfire across the capital that left 194 dead with 1,154 wounded.
The dead include 104 rebel troops, 49 civilians, and 41 police officers.
Government officials said the coup appeared to have failed as Turks took to the streets overnight to confront troops attempting to take over the country.
A senior Turkish official says a total of 1,563 military personnel have been detained across Turkey.
Meanwhile, Turkey's presidency said on Twitter that another uprising attempt in Turkey could be staged at any time, adding that it was necessary to stay in charge of the streets.
Operations to take back control of the armed forces headquarters in Ankara were still underway, a Turkish official said. Police special forces and the military are securing the perimeter of the headquarters, the official said.
"Shots were fired by a military officer from inside the walls earlier this morning."
Turkey's intelligence agency headquarters were attacked by military helicopters and heavy machinegun fire during an attempted military coup overnight, wounding at least three people, an intelligence source told Reuters on Saturday.
The head of the agency, Hakan Fidan, was at a secure location throughout the events and was in constant contact with President Tayyip Erdogan and Prime Minister Binali Yildirim, the source said.
The intelligence agency was still working with the armed forces, the police and the government against the coup plotters in ongoing operations in Istanbul and Ankara in particular, the source said.
Reports are saying that Turkish Military Chief Hulusi Akar has been rescued after being held hostage. He was previously reported as killed.
Meanwhile, 29 colonels and five generals have been removed from their positions as a result of the coup attempt. Additionally, 754 members of the Turkish Armed Forces were detained.
Addressing a crowd of supporters outside Istanbul Ataturk Airport on Saturday morning, Erdogan told a crowd assembled there: "They have pointed the people's guns against the people. The president, whom 52 percent of the people brought to power, is in charge. This government brought to power by the people, is in charge. They won't succeed as long as we stand against them by risking everything."
Earlier, Erdogan said the government was arresting coup supporters in the military and warned "they will pay a heavy price for their treason to Turkey," according to a transcript of his remarks provided by his office. "Those who stain the military's reputation must leave. The process has started today, and it will continue just as we fight other terrorist groups."
In images broadcast on CNN-Turk, dozens of soldiers walked among tanks with their hand held up, surrendering to government forces on Istanbul's Bosporus Bridge. Discarded gear was strewn on the ground. People, some holding flags, climbed onto the tanks. Fifty soldiers were taken into custody, according to the state-run Anadolu Agency.
An official in Erdogan's office says at least 60 people have been killed and more than 330 people have been arrested. The official spoke on condition of anonymity, in accordance with government rules.
Turkey's Police Chief Celalettin Lekesiz says 16 coup plotters have been killed in clashes at Turkey's military police command.
In comments carried by the state-run Anadolu Agency Saturday, Lekesiz says 250 others have been arrested. He says clashes at the command are continuing but "are about to come to an end."
The report says Gen. Memduh Hakbilen, the chief of staff of Turkey's command for the Aegean region, is among those arrested.
Erdogan, who said his general secretary had been abducted by the coup plotters, flew into Ataturk airport early Saturday and was greeted by large crowds. Hours earlier, as the coup attempt got underway, his office declined to say where he was, and he was forced to give an interview over FaceTime to a television station.
Prime Minister Binali Yildirim has called all legislators for an emergency meeting Saturday, Anadolu reported.
The chaos capped a period of political turmoil in Turkey which critics blamed on Erdogan's increasingly authoritarian rule, which has included a government shake-up, a crackdown on dissidents and opposition media and renewed conflict in the mainly Kurdish areas of the southeast.
Turkey, a NATO member, is a key partner in US-led efforts to defeat ISIS, and has allowed American jets to use its Incirlik air base to fly missions against the extremists in nearby Syria and Iraq. A coup against the democratically elected government could make it difficult for the United States to continue to cooperate with Turkey.
US President Barack Obama urged all sides in Turkey to support the democratically elected government. NATO Secretary-General Jens Stoltenberg said he spoke to Turkish Foreign Minister Mevlut Cavusoglu and called for respect for democracy.
The coup attempt began late Friday, with a statement from the military saying it had seized control "to reinstall the constitutional order, democracy, human rights and freedoms, to ensure that the rule of law once again reigns in the country, for law and order to be reinstated."
Fighter jets buzzed overhead, gunfire erupted outside military headquarters and vehicles blocked two major bridges in Istanbul. Soldiers backed by tanks blocked entry to Istanbul's airport for a couple of hours before being overtaken by pro-government crowds carrying Turkish flags, according to footage broadcast by the Dogan news agency.
But the military did not appear unified, with top commanders taking to television to condemn the action and order troops back to their barracks.
"Those who are attempting a coup will not succeed. Our people should know that we will overcome this," Gen. Zekai Aksakalli, the commander of the military special forces, told the private NTV television by telephone.
Fighter jets under the control of loyalist forces were flying over the capital to strike at helicopters flown by coup supporters, the Anadolu news agency said. NTV reported that one helicopter was shot down. Gunfire and explosions rang out.
Erdogan called on Turks to take to the streets across the country, and many did, marching through the streets of Izmir and Istanbul, waving Turkish flags and gathering in the main square in Ankara. The Dogan news agency reported that soldiers fired on a group of people trying to cross the Bosporus bridge to protest the attempted coup, and that some people have been hurt. TV footage showed people running for cover amid gunfire.
Troops also fired in the air to disperse a growing crowd of government supporters at the Taksim monument in Istanbul as military helicopters flew overhead. A nearby mosque made an anti-coup announcement over its loudspeakers. Several blasts and the screech of fighter jets were heard in central Istanbul as dawn approached.
At least 42 people were killed in the capital, NTV quoted the prosecutor's office as saying. Parliament Speaker Ismail Kahraman said a bomb hit one corner of a public relations building inside the parliament complex, injuring some police officers. Turkish media broadcast images of plaster and debris strewn on the ground there.
In Istanbul, an official at Haydarpasa Numune Hospital said at least 150 people were admitted with wounds but would not comment on whether there were fatalities. NTV reported six dead had been brought to that hospital. An official at Istanbul's Sisli Hamidiye Etfal Training and Research Hospital said they had also received dead and wounded. Both officials spoke on condition of anonymity because they were not allowed to comment publicly.
In his TV address, Erdogan blamed the attack on supporters of Fethullah Gulen.
Erdogan has long accused the cleric and his supporters of attempting to overthrow the government. The cleric lives in exile in Pennsylvania and promotes a philosophy that blends a mystical form of Islam with staunch advocacy of democracy, education, science and interfaith dialogue.
By Saturday morning, a top Turkish official said the coup attempt appeared to have been repelled. The senior official told The Associated Press that all government officials were in charge of their offices. The official requested anonymity because of the sensitivity of the issue.