Later on Sunday, the president joined a march on Istanbul's Bosphorus Bridge, which saw bloody conflicts over coup night and then renamed as "15 July Martyrs Bridge".
Erdogan also vowed to eliminate every single cell of FETO, an organization led by U.S.-based cleric Fetullah Gulen, who is accused by the government of plotting the coup attempt.
Turkish President Recep Tayyip Erdogan makes a speech during a commemoration event marking the second anniversary of the defeated failed coup in 2016 in Ankara, Turkey, July 15, 2018. (Xinhua)
ANKARA, July 15 (Xinhua) -- Turkey on Sunday marked the second anniversary of the bloody coup attempt on July 15, 2016, which left about 2200 people dead and more than 2,000 wounded while resisting coup soldiers who took to the streets in tanks and with guns.
Public rallies and commemoration ceremonies were held in capital Ankara, Istanbul, Izmir and many cities across the country.
"Turkey has not just thwarted a coup on July 15 with its resistance, it also saved the dignity and reputation of democracy in the entire world," Turkish President Recep Tayyip Erdogan said during a meeting with the relatives of victims and survivors who rushed to streets to resist the putschists.