BERLIN (Reuters) - Turkey cannot join the European Union if it reinstates the death penalty, a spokesman for the German government said on Monday, sending a clear message to President Tayyip Erdogan who has raised the possibility after a failed military coup.

The government also urged Turkey to maintain the rule of law in investigating and bringing those behind the weekend coup attempt to justice, and raised questions about Turkey’s decision to round up thousands of judges.

“Germany and the member states of the EU have a clear position on that: we categorically reject the death penalty,” government spokesman Steffen Seibert told a news conference.

“A country that has the death penalty can’t be a member of the European Union and the introduction of the death penalty in Turkey would therefore mean the end of accession negotiations.”

Turkey abolished capital punishment in 2004, allowing it to open EU accession talks the following year, but the negotiations have made scant progress since then.

With pro-government protestors demanding that the coup leaders be executed, Erdogan said on Sunday that the government would discuss the measure with opposition parties.

Even before the coup attempt, many EU states were not eager to see such a large, mostly Muslim country as a member, and were concerned that Ankara’s record on basic freedoms had gone into reverse in recent years.

Turkey widened the crackdown on suspected supporters of the coup on Sunday, taking the number of people rounded up in the armed forces and judiciary to 6,000.

German officials said they had seen no evidence of any conspiracy in the events beyond an effort by parts of the Turkish military to seize control of the government.

Erdogan and the Turkish government have accused the U.S.-based Muslim cleric Fethullah Gulen, a former ally of Erdogan, of orchestrating the coup.

Seibert said German and EU officials would emphasise the need to maintain the rule of law in all their conversations with Turkey. He said he expected EU foreign ministers to address their concerns about the revival of the death penalty and disproportionate punishment in a joint statement about the situation after a meeting in Brussels later on Monday.

“Everyone understands that the Turkish government and the Turkish justice system must bring those responsible for the coup to justice, but they must maintain the rule of law, and that always means maintaining proportionality ... and transparency.”

German Foreign Minster Frank-Walter Steinmeier spoke to his counterpart early on Sunday, but Chancellor Angela Merkel has not spoken to Erdogan since the attempted coup, government spokesmen said.