After hours of chaos and violence unseen in decades, Erdogan ended uncertainty over his whereabouts, flying into Istanbul airport in the early hours and making a defiant speech cheered by hundreds of supporters.
Soldiers and tanks took to the streets late last night and multiple explosions rang out throughout the night in Ankara and Istanbul, the two biggest cities of the strategic NATO member of 80 million people.
Officials insisted the putsch bid was falling apart with over 1,560 officers held and close to 200 unarmed soldiers at the Turkish military HQ surrendering.
Crowds of flag-waving supporters of Erdogan's ruling Justice and Development Party (AKP) appeared to have turned the tide, defying orders of a curfew and marching out onto the streets to block the attempt to overthrow the regime.
The strongman denounced the coup attempt as "treachery", saying he was carrying out his functions and would keep on working "to the end".
Turkey's parliament, which had been targeted by coup plotters and received extensive damage, was meanwhile holding an extraordinary session, broadcast live on television, while special forces were reportedly securing the headquarters of the military chief of staff.
Dozens of soldiers backing the coup surrendered on the Bosphorus bridge in Istanbul they had held throughout the night, holding their hands above their heads as they were detained, television pictures showed.
As a helicopter flew over the famed Taksim Square, scene of massive anti-Erdogan protests three years ago, the crowd began to boo, shaking their fists at the night sky before they were shot at by the soldiers.
"The people are afraid of a military government," a 38-year-old man who gave his name as Dogan told AFP. "Most of them have been in military service, they know what a military government would mean."
The sound of F16 fighter jets screaming low over the capital Ankara signalled the start of the putsch late Friday, with troops also moving to block the two bridges across the Bosphorus Strait in Istanbul.
