Prime Minister Binali Yidirim said Saturday the situation was under control, and that army head Hulusi Akar remained in control of the military and was not part of the coup.
Erdogan was said to be in an undisclosed but secured location.
"We will overcome this", Erdogan said, speaking by mobile phone to the Turkish sister station of CNN.
Explosions, gunfire and a reported air battle between loyalist forces and coup supporters erupted in the capital throughout the night and Turks heeded the president's call to take to the streets to show support for his embattled government.
Erdogan, appearing on television over a mobile phone, had urged supporters into the streets to defend the government, and large crowds heeded his call.
An anchorwoman at TRT1 TV read a script approved by the military who seized her newsroom, referring to Erdogan as a traitor. "Let us gather in our squares, at our airports as the people and let that minority group come upon as with their tanks and artillery and do whatever they wish to do", Erdogan said.
The majority of those killed were civilians and most of those detained are soldiers, said the official, without giving further details. Discarded gear was strewn on the ground. People, some holding flags, climbed onto the tanks. He said it is a reason to clean up the armed forces.
The Indian government today said that it is closely monitoring the situation in Turkey.
However, he was nowhere to be seen just hours earlier when the coup attempt kicked off.
According to Prime Minister Binali Yildirim, the number of soldiers who were arrested in the coup plot has increased to 130.
The chaos capped a period of political turmoil in Turkey which critics blamed on Erdogan's increasingly authoritarian rule. Turkey's military has intervened several times to overthrow past regimes.
While the Turkish people flooded the streets in support of democracy, the Turkish police were involved in firefights with the rebel factions.
The Turkish leader also revealed that his secretary general was taken away.
Footage on local television channels showed military vehicles blocking bridges over the Bosphorus in Istanbul and tanks deployed at the city's main airport.
Broadcaster CNN-Turk was back on air, having been closed down on Friday night when soldiers entered the building and ordered journalists to leave.
"Those who are attempting a coup will not succeed".
Military jets were heard flying over Ankara and Istanbul. AFP reports Turkish fighter jets shot down the helicopters. Gunfire and explosions rang out.
The coup was attempted when President Erdogan was on vacation and returned to Istanbul (Constantepole) and a group of Turkish military officers said they were taking over the country in order to restore democracy.
The capital was also bombed by the military in the attempt to overtake the government. Turkish media broadcast images of plaster and debris strewn on the ground there. NTV reported six dead had been brought to that hospital.
An official at Haydarpasa Numune Hospital in the Uskudar district of Istanbul tells The Associated Press they have admitted at least 150 wounded. The official requested anonymity because of the sensitivity of the issue.
Turkey Blocks, a Twitter account that regularly checks if sites were being blocked in the country, reported at 11.04 p.m., that Facebook, Twitter and YouTube were all unresponsive, TechCrunch reported. Emrah Gurel and Cinar Kiper in Istanbul and Jill Lawless in London also contributed.