Turkish troops launched a coup Friday, with soldiers taking to the streets of Ankara and Istanbul as President Recep Tayyip Erdogan vowed the putschists would pay a "very heavy price".
Jets screeched low overhead in the capital, while citizens rushed for the safety of their homes.
AFP correspondents reported a strong explosion in Ankara just before 1:00 am (2200 GMT), though it was not immediately clear what caused the blast.
Turkey's top general Hulusi Akar was taken hostage at the military headquarters in the capital Ankara after the attempt to bring down the government, the state-run Anadolu news agency reported.
State broadcaster TRT said the military had declared martial law and a curfew, in a statement signed by a group calling itself the "Council for Peace in the Homeland".
"The power in the country has been seized in its entirety," said a military statement quoted by Turkish media.
It said the coup had been launched "to ensure and restore constitutional order, democracy, human rights and freedoms and let the supremacy of the law in the country prevail, to restore order which was disrupted".
"All our international agreements and commitments retain their validity," the statement added.
"We hope our good relations will continue with all countries in the world."
Erdogan, speaking from what a presidential source said was a secure location, urged people to take to the streets to resist the coup.
"I certainly believe that coup plotters will not succeed," he said, speaking on a mobile phone via FaceTime in his first reaction to the move by the Turkish armed forces.
"I urge the Turkish people to convene at public squares and airports. I never believed in a power higher than the power of the people."
Erdogan said he was still president and Turkey's commander in chief, promising that plotters would pay a "very heavy price".
It was earlier reported that the president was on vacation in the Mediterranean resort of Marmaris.
Television pictures showed tanks deployed outside Ataturk airport in Istanbul. Reports said that flights into the airport had been halted.
US President Barack Obama has been briefed, with US National Security Council spokesman Ned Price saying: "The president's national security team has apprised him of the unfolding situation in Turkey."
The EU called for "restraint and respect for democratic institutions" in Turkey.
Neighbouring Greece said it was following the situation closely.
- History of coups -
Turkey has a history of coups, with governments ousted on three occasions by full military coups since 1960.
However, analysts had usually assumed that Erdogan's ruling Justice and Development Party (AKP) had good relations with the military.
Earlier on Friday, security forces had partially shut down the two bridges across the Bosphorus Strait in Istanbul as military jets were heard flying low over Ankara, reports and AFP correspondents said.
The Bosphorus and Fatih bridges were closed by the gendarmerie -- a branch of the Turkish military dedicated to internal security -- for traffic travelling from Asia to Europe, NTV television said.
AFP correspondents said that Istanbul had been turned into a ghost town after the events, with people who had been outside for a Friday night rushing home for safety.
But some on the streets were hailing news of the coup.
"Now things are changing -- Turks are on fire," Fethi Karabas, a 27-year-old tour guide in Taksim Square, told AFP.
"We have hope now," he added. "Turkey has been in a very polarised state for almost 15 years now... This is the manifestation of all that anger."
Rojhat Dogru, a Turkish Kurd on holiday in Istanbul, added: "I am very happy. Erdogan is a murderer but now he is dead."
Reactions were swiftly pouring in from around the world, with Russian Foreign Minister Sergei Lavrov calling on Turkey to avoid all "bloodshed".
"Problems in Turkey need to be resolved in accordance with the constitution," Lavrov said, speaking in Moscow at a joint press conference with US Secretary of State John Kerry.
The US diplomat said he hoped for "peace and continuity" in Turkey, while a Greek government source said Prime Minister Alexis Tsipras had been "briefed by the head of secret services" about the developments.
AFP
Fri Jul 15 2016
A military tank drives past during a coup attempt at entrance to the Bosphorus bridge in Istanbul on July 16, 2016. - AFP Photo
Former special forces commander Prabowo to take up Indonesian presidency
Indonesia's Prabowo Subianto will take over as president of the world's third-largest democracy after sweeping the country's election with policies like free meals for school children
Who is Prabowo Subianto, incoming president of Indonesia?
A wealthy ex-general with ties to Indonesia's popular outgoing president and its dictatorial past, looks set to be its next leader.
Trump says he would impose tariffs on China if China went into Taiwan
Republican presidential candidate Donald Trump said he would impose additional tariffs on China if China were to "go into Taiwan,"
Iran's supreme leader says Hamas leader's death will not halt 'Axis of Resistance'
The "Axis of Resistance", built up with years of Iranian support, includes Hamas, the Lebanese Hezbollah group, the Houthi movement in Yemen, and various Shi'ite groups in Iraq and Syria.
Putin says Russia willing to seek compromises between Iran and Israel
Russia is ready to help seek compromises between arch-foes Israel and Iran, President Vladimir Putin said on Friday, saying these would be difficult but possible.
What proposals will Russia push at the BRICS summit?
The proposal is also to establish a BRICS reinsurance company to allow uninterrupted shipment of goods and key commodities between members.
Indonesia's free meals plan in the spotlight as Prabowo readies for office
Prabowo calls the programme one of the main drivers of economic growth, eventually set to add an estimated 2.5 million jobs.
Astro AWANI's revamped English news website, AWANI International, launches on Oct 21
Astro AWANI's revamped English platform delivers in-depth global news and expert analysis to keep you informed on key developments.
Israeli strikes kill 33 people in Jabalia refugee camp in Gaza, medics say
Residents of Jabalia said Israeli tanks had reached the heart of the camp after pushing through suburbs and residential districts.
Liam Payne's ex-partner calls for media restraint after 'painful' death
Cheryl Tweedy used her statement to urge the media to remember they had a seven-year-old son, Bear, who could read the reports.
Analysts: Indonesia's strong MoF leadership team to boost investor confidence
Sri Mulyani Indrawati as head of Indonesia's Ministry of Finance is expected to instil confidence among investors.
Biden offers both a carrot and a stick to Israel as his term nears an end
Israel has frequently resisted US advice and has caused political difficulties for the Biden administration.
Putin says BRICS will generate most of global economic growth
Russian President Vladimir Putin will host a summit of the group in the city of Kazan on Oct. 22-24.
ISIS Malaysia's perspective of Budget 2025
An excellent rakyat-centric budget under the overarching principle of a caring and humane economy.
Budget 2025: Record increase in STR, SARA aid initiatives
The government will provide a significant boost to the Sumbangan Tunai Rahmah (STR) and Sumbangan Asas Rahmah (SARA) initiatives next year.
Budget 2025: EPF contributions to be made mandatory for foreign workers – PM Anwar
The government plans to make it compulsory for all non-citizen workers to contribute to the Employees Provident Fund (EPF).
What policies to expect from Indonesia's new President Prabowo
Prabowo will be open to foreign investment, his aide has said, such as by offering investors management of airports and sea ports.
Budget 2025: Govt allocates RM470 mil to empower women's participation in PMKS
The Women's Leadership Apprenticeship Program will be intensified as an effort to produce more female corporate personalities.
Israel sends more troops into north Gaza, deepens raid
Residents of Jabalia in northern Gaza said Israeli tanks had reached the heart of the camp, using heavy air and ground fire.
Indonesia ramps up security ahead of Prabowo's inauguration
Prabowo Subianto will be sworn in as Indonesia's president on Sunday with Vice President-elect, Gibran Rakabuming Raka, also taking office.