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 supporters, and said the coup attempt was an "act of treason" in a live TV speech.
Forty-two people died during overnight clashes in the capital, Ankara, most of them civilians, the prosecutor's office said.
Prime Minister Binali Yildirim said the situation was largely under control and 130 people had so far been arrested.
He has ordered the military to shoot down aircraft being used by coup plotters.
Earlier, one of the helicopters being flown by forces involved in the coup attempt was shot down over Ankara.
However, the whereabouts of the military chief of staff remains unknown and sporadic gunfire is still reported in major cities.
Istanbul's main Ataturk airport is now under army control, and flights - which had been interrupted for some hours - are due to resume from 06:00 (03:00 GMT).
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 were believed to be hiding in shelters.
Broadcaster CNN Turk was reportedly taken over by soldiers, and its live broadcast was cut.
In Washington, US President Barack Obama urged all parties in Turkey to support the "democratically elected government" while Nato called for "full respect" for Turkey's democratic institutions.
Speaking in Istanbul in the early hours on Saturday, President Erdogan promised to clean up the army.
"Those who drive around in tanks will have to go back to where they came from," he said.
He also dismissed the coup leaders as "terrorists".
Mr Erdogan earlier told CNN Turk by mobile phone the action was by a "parallel structure" that would bring the necessary response.
Culled from BBC