Turkish President Recep Tayyip Erdogan has flown in to Istanbul, after an army group said it took over the country.
He was seen surrounded by cheering supporters, and said the uprising was an act of treason in a live TV speech.
The army group earlier declared that a "peace council" now ran the country and there was a curfew and martial law.
But Prime Minister Binali Yildirim later said the situation was largely under control and a no-fly zone was declared over the capital Ankara.
Soldiers were earlier seen at strategic points in Istanbul with jets flying low in Ankara.
Two large explosion were also heard near Istanbul's central Taksim Square.
There were also reports of blasts at parliament building in Ankara. MPs are believed to be hiding in shelters.
CNN Turk broadcaster was reportedly taken over by soldiers, and its live broadcast was cut.
It is unclear who is leading the plotting army group, or how much support it enjoys. Some top army officials are said to be detained.
People across Turkey are very confused and surprised, the BBC's Katy Watson in Istanbul says.
In Washington, US President Barack Obama urged all parties in Turkey to support the "democratically elected government".
Nato called for "full respect" for Turkey's democratic institutions.
Mr Erdogan earlier told CNN Turk by mobile phone the action was by a "parallel structure" that would bring the necessary response. He has used this term in the past to refer to Fethullah Gulen, a US-based Muslim cleric he accuses of fomenting unrest.
Erdogan called on people to take to the streets to oppose the uprising.
He said: "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."
Reports earlier on Friday said the president was on holiday in the south-western resort of Marmaris.
Defying the announced curfew, a number of Erdogan supporters then turned out on Taksim Square.
There have since been reports of clashes there, with some on Twitter saying that gunfire has been heard near the square.
Yildirim had earlier denounced an "illegal action" by a military "group", stressing it was not a coup. He said that the government remained in charge.
The military group's statement on national broadcaster TRT, read by an announcer, said that democratic and secular rule of law had been eroded by the current government. There would be new constitution, it said.
A Turkish presidential source told Reuters news agency that the statement was not authorised by the army's command.
There are reports Turkey's top general, General Hulusi Akar, is among those taken hostage at the military HQ.
Yildirim told NTV by telephone: "There was an illegal act by a group within the military that was acting out of the chain of military command. Our people should know that we will not allow any activity that would harm democracy."
Traffic has been stopped from crossing both the Bosphorus and Fatih Sultan Mehmet bridges in Istanbul.
There are reports of gunshots and at least one loud explosion in the capital Ankara. Other reports said soldiers were inside buildings of the Turkish state broadcaster in Ankara.
Gunfire was also heard outside Istanbul police HQ and tanks are said to be stationed outside Istanbul airport. All flights are cancelled, reports say.
(BBC)