Turkish President Recep Tayyip addresses the crowd following a funeral service for victims of the thwarted coup in Istanbul at Fatih mosque in Istanbul, Turkey, July 17, 2016.
President Tayyip Erdogan and the government accused the U.S.-based Muslim cleric Fethullah Gulen, a former ally whom Erdogan accuses of trying to create a "parallel structure" within the courts, police, armed forces and media, of orchestrating the coup.
Erdogan's supporters of gathered in front of his Istanbul home to call for the plotters to face the death penalty, which Turkey outlawed in 2004 as part of its efforts to join the European Union.
"We cannot ignore this demand," Erdogan told the chanting crowd. "In democracies, whatever the people say has to happen."
He said a "terror group" led by Gulen had "ruined" the armed forces, that its members were being arrested in all military ranks, and that a purge of this "virus" would continue. Gulen denied any connection with the coup.
The president has called on Turks to stay on the streets until July 16, and late into July 17 night, his supporters thronged squares and streets, honking horns and waving flags.
Pictures on social media showed detained soldiers stripped to the waist, some wearing only their underpants, handcuffed and lying packed together on the floor of a sports hall where they were being held in Ankara.
One video posted on Twitter showed detained generals with bruises and bandages. Akin Ozturk, head of the air force until 2015 and identified by three senior officials as one of the suspected masterminds of the coup plot, was among those held.
The Foreign Ministry raised the death toll to more than 290, including over 100 rebels, and said 1,400 people were hurt.
The violence shocked the nation of almost 80 million, once seen as a model Muslim democracy, where living standards have risen steadily for more than a decade and where the army last used force to stage a successful coup more than 30 years ago.
It also shattered fragile confidence among Turkey's allies about security in the NATO country, which is a leading member of the U.S.-led coalition against Islamic State. Turkey had already been hit by repeated suicide bombings over the past year and is struggling to contain an insurgency by Kurdish separatists.