The parliament of Turkey has approved a three-month extension of the state of emergency which had been in effect since last July's failed military coup.

The move initiated by Prime Minister Binali Yildirim was backed on Monday by the ruling Justice and Development Party (AKP) as well as the opposition Nationalist Movement Party (MHP).

It followed weekend ceremonies to mark the anniversary of the abortive coup in which about 250 people were killed and nearly 2,200 more injured.

Joining tens of thousands of anti-coup demonstrators in Istanbul on Saturday, President Recep Tayyip Erdogan threatened to "chop off the heads" of those involved in the attempt to oust his government.

"First of all we will chop off the heads of those traitors," Erdogan said as he reaffirmed previous comments to sign any bill passed restoring capital punishment.

"We are a state governed by rule of law. If it comes to me after parliament, I will sign it," he said. Restoring the death penalty would effectively end Turkey's European Union membership ambitions.

Erdogan also praised the "people's faith" in facing up the armed coup plotters.

Fourth extension

Turkey declared the state of emergency on July 20, 2016, and extended it for the fourth time after the coup attempt of July 15, 2016 which Ankara believes was organised by the US-based Turkish cleric Fethullah Gulen.

According to the Turkish constitution, a state of emergency can be declared for a maximum period of six months.

During the emergency rule, the cabinet has the right to issue statutory decrees under the president of the republic without regard to routine procedures and restrictions in the country's constitution.

These decrees are first published in the official gazette and then submitted to parliament for ratification.