text: He was addressing supporters outside his Istanbul residence who were chanting for capital punishment to be restored.
  EU officials have warned that Turkey's bid to join the bloc would be finished if Ankara restored the death penalty.
  Mr Erdogan has overseen a crackdown since the coup attempt was quashed.
  Thousands of police officers, military personnel and judges have been suspended or arrested. Turkey's Western allies have expressed concern and urged President Erdogan to respond in a measured way.
  But speaking to his supporters on Tuesday morning, the president said Turkey was "a democratic state run by the rule of law".
  He said he was ready to reinstate the death penalty if the Turkish people demanded it and parliament approved the legislation, adding: "You cannot put aside the people's demands."
  "Today is there no capital punishment in America? In Russia? In China? In countries around the world? Only in European Union countries is there no capital punishment," he said.
  Turkey abolished the death penalty in 2004 as part of its bid to become a member of the EU.
  On Monday, Mr Erdogan said suggestions that he was using the coup attempt to crack down on his political opponents were "libel".
  "I'd like to know what a crackdown by Tayyip Erdogan looks like... It's just libel," he said.
  "If Tayyip Erdogan was an oppressive figure, he wouldn't have won 52% of the vote at the presidential elections."
  Also on Monday, one of the coup's alleged ringleaders, the air force commander Gen Akin Ozturk, appeared in court.
  The general, who appeared to have several recent injuries, denied any involvement in the uprising.
  At least 232 people were killed and 1,400 wounded in fighting after rebel troops sealed off bridges in Istanbul, surrounding the city's Ataturk airport and stationed tanks outside the presidential palace in Ankara. Many later surrendered.
  Officials have blamed the unrest on the US-based Muslim cleric Fethullah Gulen and the "parallel structure" they say he has formed to topple the government.
  Mr Erdogan insists the US should extradite Mr Gulen, warning that it "should not keep such a terrorist".
  US Secretary of State John Kerry has said Turkey would need to provide "evidence, not allegations" against Mr Gulen, who has denied any involvement in the plot.
  The Turkish interior ministry dismissed almost 9,000 police officers on Monday as part of a purge of officials suspected of involvement in the coup attempt.
  That followed the arrest of 6,000 military personnel and suspension of almost 3,000 judges over the weekend.
target: Turkish President Recep Tayyip Erdogan says he is ready to reinstate the death penalty "if the people demand it", following the recent coup attempt.