He was seen surrounded by cheering supporters, saying in a live TV speech that the coup attempt was an “act of treason” and the army must be cleansed.
Sixty people died during overnight clashes, many of them civilians, and 754 soldiers were arrested, officials said.
Prime Minister Binali Yildirim said the situation was largely under control.
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 the capital Ankara.
Meanwhile, the whereabouts of the military chief of staff, Gen Hulusi Akar, are still unknown. He is reported to have been taken hostage by rebel soldiers.
Gen Umit Dundar, commander of the 1st Army, has been appointed acting chief of staff.
Sporadic gunfire is still reported in major cities.
Reports also say rebel soldiers in some areas have been surrendering their weapons to police loyal to Mr Erdogan.