Turkey has been warned by Germany that it will kill its chances of joining the European Union if it reinstates the death penalty in the wake of a failed military coup.

World leaders have also threatened the country with expulsion from Nato.

More than 6,000 people, mainly military personnel and workers in the interior ministry have been arrested since the coup plotters sent warplanes firing on key government installations and tanks rolling into major cities on Friday night.

But the rebellion wasn't supported by the military's top brass and was quashed by loyal government forces and masses of civilians who took to the streets. At least 294 people were killed and more than 1,400 wounded.

Turkish president Tayyip Erdogan has been warned by German Chancellor Angela Merkel that if he reinstates the death penalty in the wake of the military coup, it will kill Turkey's chances of joining the EU

After the Turkish government said they had took back control of the country, they pledged to severely punish those responsible for the uprising.

And while responding to crowds of supporters calling for the death penalty for the plotters on Sunday, President Tayyip Erdogan said such demands could not be ignored.

However in Berlin today, German Chancellor Angela Merkel's spokesman said Turkey's bid on joining the EU would end if Ankara restored the death penalty.

Steffen Seibert told reporters that the EU is a 'community of values, therefore the institution of the death penalty can only mean that such a country could not be a member.'

After the Turkish government said they had took back control of the country, the pledged to severely punish those responsible for the uprising. Pictured are military commanders accused of being the coup masterminds

For the moment, he says that Germany and other EU countries are watching the internal Turkish debate on whether to institute the death penalty, but that the EU's position is clear.

'In the first hours after the failed coup, we witnessed revolting scenes of caprice and revenge against soldiers on the streets. That cannot be accepted.

'We categorically reject the death penalty and an institution of the death penalty would mean an end to the negotiations to join the EU,' he added.

His comments follow those of the head of EU foreign affairs Federica Mogeherini, who also said Turkey would be barred from joining the block if they reinstated capital punishment.

'Let me be very clear... no country can become an EU state if it introduces the death penalty,' Mogherini said when asked about the possible impact on long-stalled accession talks with Ankara.

While US Secretary of State John Kerry called on Turkey to uphold democracy and human rights as it pursues the military officers and anyone else involved in the plot.

The top American diplomat said Turkey must 'uphold the highest standards for the country's democratic institutions and the rule of law.'

While responding to crowds of supporters calling for the death penalty for the plotters on Sunday, President Erdogan said such demands could not be ignored.

While he recognized the need to apprehend the coup plotters, Kerry said: 'We caution against a reach that goes beyond that.'

But both Mogherini and Kerry reiterated the trans-Atlantic support for Turkish President Recep Tayyip Erdogan's democratically elected government.

Both the EU and the U.S. need a stable Turkey right and Washington is working with its NATO partner to fight the ISIS in Iraq and Syria.

Kerry credited Turkey for reopening a key air base in the south of the country and Brussels is counting on Turkey to stem refugees from reaching the continent.

Erdogan is demanding that Washington hand over an exiled cleric he blames for orchestrating the violence.

Kerry said no extradition request for the Pennsylvania-based cleric, Fethullah Gulen, has arrived yet. But he stressed that the U.S. needed to see 'evidence, not allegations' of Gulen's responsibility.

US Secretary of State John Kerry called on Turkey to uphold democracy and human rights as it pursues the military officers and anyone else involved in the plot

Meanwhile Turkish President Tayyip Erdogan said it was for the country's parliament to decide whether to restore the death penalty but that if it did so he would sign such a measure into law.

Turkey scrapped capital punishment in 2004 as part of its push to join the European Union but calls for its reinstatement have grown following an abortive military coup on Friday evening in which more than 200 people were killed.