Turkish President Recep Tayyip Erdogan has flown in to Istanbul, after an army group attempted to take 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.
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).