Turkey on Sunday commemorated the second anniversary of a bloody coup attempt which was followed by a series of purges in the public sector and changes to boost President Recep Tayyip Erdogan's powers.

Two hundred and forty-eight people were killed and over 2,000 were wounded after a rogue military faction tried to overthrow Erdogan on July 15, 2016.

The attempted coup was blamed by Ankara on US-based Muslim preacher Fethullah Gulen, a former ally turned foe of Erdogan. Gulen denies the claims.

In a series of events, Erdogan took part in a religious ceremony in an Ankara mosque before he hosted a lunch with martyrs' families and those wounded at the presidential palace.

July 15 is now a national holiday and Erdogan promised during the lunch that "we will not let it be forgotten and we will not forget it".

Erdogan will at 1800 GMT address citizens on the bridge across the Bosphorus in Istanbul now renamed the July 15 Martyrs' Bridge which was the scene of bloody fighting between Erdogan's supporters and renegade soldiers.

Ankara municipality organised a rally in the renamed July 15 Kizilay National Will Square due to start at 1800 GMT, the same place where thousands gathered nightly for a month after the coup attempt.

Dozens of life sentences have been handed down against the putschists while hundreds more court cases continue across Turkey against alleged coup-plotters.

The government said earlier this year that over 77,000 people have been arrested over suspected links to Gulen.

Tens of thousands have also been dismissed or suspended from the public sector over alleged Gulen ties, including judges and soldiers, in a crackdown criticised by Turkey's Western allies and human rights activists.

Turkey has been under a state of emergency since July 20, 2016 but Erdogan's spokesman this week said it would be lifted on Wednesday.

Erdogan vowed that the fight against the "Fethullah Terrorist Organisation" (FETO), Ankara's name for the Gulen movement which it calls a "virus", would continue.

"We will find and remove them from all the cells they have entered," he said.

The anniversary comes after Erdogan won outright in June 24 presidential elections. After the polls, constitutional reforms to create an executive presidency came into force giving Erdogan sweeping powers.

Erdogan issued seven decrees early Sunday to reshape several public institutions. The Armed Forces General Staff is now under the authority of the defence minister while the Supreme Military Council (YAS) which decides on senior military appointments and strategic priorities has been restructured.