NATO was quick to respond to what it calls “speculative” reports in the Turkish press, saying Turkey has the support of its NATO allies and that its membership in the alliance is not in question.

There have been reports in Turkish media of possible NATO and U.S. intelligence involvement in the failed June 15 coup. A columnist for the Haber Turk newspaper suggested the attempted putsch was planned by a secret NATOnetwork.

NATO spokeswoman Oana Lungescu said Wednesday that “Turkey is a valued ally, making substantial contributions to NATO’s joint efforts.”

Lungescu says NATO’s secretary-general, Jens Stoltenberg, strongly condemned the attempted coup. She says, “NATO counts on the continued contributions of Turkey, and Turkey can count on the solidarity and support of NATO.”

NATO officials insist that Turkey’s internal reorganisation of its military has not had a practical impact on NATO-led commands.

“Turkey has notified NATO about the changeover of a number of Turkish military personnel. There has been no impact on the implementation of NATO-led operations and missions or on the work of NATO commands,” a NATO official said, asking for anonimity.

There are some tensions between Ankara and NATO’s main country, the USA, and anti-American feeling among Turks is on the rise because of the United States’ refusal until now to extradite cleric Fethullah Gülen.

Still, the U.S. and Turkish militaries have long had extensive ties, extending beyond the NATO alliance.

Turkey has purged its military ranks of some 100 generals accused of being part of a shadowy movement that follows the US-based Turkish preacher Gülen. Turkey is accusing him of masterminding the recent failed military coup. Gülen denies any involvement.

Justice Minister Bekir Bozdag said on Tuesday that if the US failed to hand over Fethullah Gülen “it will have sacrificed Turkey to a terrorist”.

And Foreign Minister Mevlut Cavusoglu warned the European Union on Wednesday that it was making “serious mistakes” in its response to the failed coup. “They have failed the test following the coup attempt,” he was quoted as saying in a broadcast interview.

An EU-Turkey deal to halt the influx of migrants and refugees via Greece may already be in jeopardy. Another minister has warned that the agreement will be over if the EU fails to provide a date for allowing visa-free travel to EU states in the Schengen border-free area.

President Recep Tayyip Erdogan has said he will back the return of the death penalty in Turkey if parliament votes for it. Such a move would automatically end negotiations for Turkey’s entry into the EU, let alone the migrant agreement. Capital punishment was abolished under the European Convention of Human Rights.

Two Austrian ministers have already cast doubt this week on Turkey joining the EU in the next few years.

Nevertheless, in an interview with Reuters, Turkish envoy to Brussels Selim Yenel said Ankara was ready to change its anti-terrorism law, as requested by Brussels, and might not reintroduce the death penalty, a move EU leaders say would end talks to join the bloc.

“Nothing has changed,” Yenel said, dismissing Western concerns that a meeting between Turkish President Tayyip Erdogan and Russia’s Vladimir Putin might signal a shift in Turkey’s foreign policy toward Moscow.