Greece’s Supreme Court has ruled against the extradition of eight Turkish soldiers who fled to Greece in July after a failed coup attempt in Turkey, a decision which angered Ankara and further strained relations between the two neighbours.

Turkey has demanded Greece extradite them, alleging they were involved in the coup attempt and has branded them traitors.

The men – three majors, three captains and two sergeant-majors – landed a helicopter in northern Greece on 16 July and sought political asylum saying they feared for their lives in Turkey.

The soldiers deny playing a role in the attempt to oust President Recep Tayyip Erdogan, which led to a purge of the military and civil service.

“The possibility of their rights being violated or reduced regardless of the degree of guilt or the gravity of the crimes they are accused of does not allow the implementation of extradition rules,” a Supreme Court president said.

The soldiers have been kept in protective custody pending final decisions on their asylum applications in Greece. Their lawyer Christos Mylonopoulos said the verdict was “a big victory for European values”.

In pictures: Turkey coup attempt Show all 17 1 /17 In pictures: Turkey coup attempt In pictures: Turkey coup attempt Turkish President Erdogan attends the funeral service for victims of the thwarted coup in Istanbul at Fatih mosque on July 17, 2016 in Istanbul, Turkey Burak Kara/Getty Images In pictures: Turkey coup attempt Soldiers involved in the coup attempt surrender on Bosphorus bridge with their hands raised in Istanbul on 16 July, 2016 Gokhan Tan/Getty In pictures: Turkey coup attempt A civilian beats a soldier after troops involved in the coup surrendered on the Bosphorus Bridge in Istanbul, Turkey, 16 July, 2016 REUTERS/Murad Sezer In pictures: Turkey coup attempt Surrendered Turkish soldiers who were involved in the coup are beaten by a civilian Reuters In pictures: Turkey coup attempt Soliders involved in the coup attempt surrender on Bosphorus bridge Getty In pictures: Turkey coup attempt Supporters of Turkish President Recep Tayyip Erdogan wave flags as they capture a Turkish Army vehicle Getty In pictures: Turkey coup attempt People pose near a tank after troops involved in the coup surrendered on the Bosphorus Bridge in Istanbul, Turkey, 16 July, 2016 Reuters In pictures: Turkey coup attempt Turkish soldiers block Istanbul's Bosphorus Brigde Getty In pictures: Turkey coup attempt A Turkish military stands guard near the Taksim Square in Istanbul Reuters In pictures: Turkey coup attempt Pierre Crom/Twitter In pictures: Turkey coup attempt Turkish soldiers secure the area as supporters of Recep Tayyip Erdogan protest in Istanbul's Taksim square AP In pictures: Turkey coup attempt People demonstrate in front of the Republic Monument at the Taksim Square in Istanbul Murad Sezer/Reuters In pictures: Turkey coup attempt Turkish soldiers detain police officers during a security shutdown of the Bosphorus Bridge Reuters In pictures: Turkey coup attempt Turkish Army armoured personnel carriers in the main streets of Istanbul Getty In pictures: Turkey coup attempt Chaos reigned in Istanbul as tanks drove through the streets EPA/TOLGA BOZOGLU In pictures: Turkey coup attempt Turkish President Tayyip Erdogan speaks to media in the resort town of Marmaris Reuters In pictures: Turkey coup attempt Supporters of President Erdogan celebrate in Ankara following the suppression of the attempted coup Reuters

But the decision brought an angry response from the Turkish foreign ministry, which accused Greece of protecting plotters and said relations between the two countries would be reviewed.

Turkey would “use all avenues of law” to ensure the soldiers’ extradition and prosecution, it added.

“Once again Greece, an ally and a neighbour, has failed to fulfil the basics of the fight against terrorism,” it said.

“The impact of this decision thought to be made with political motives on our mutual ties, our cooperation in the fight against terrorism and our work on other mutual and regional issues will be subject to a comprehensive review.”

The state-run Anadolu news agency reported earlier that Turkish authorities had issued arrest warrants for the soldiers.

The soldiers have been accused in Turkey of attempting to abrogate the constitution and dissolve parliament, seizing a helicopter, using violence and attempting to assassinate Mr Erdogan.

Relations between Greece and Turkey, neighbours and NATO allies, have improved over the years but they remain at odds over territorial disputes and ethnically split Cyprus. In 1996, they almost reached the brink of war over an uninhabited islet.

The two countries play an important role in the handling of Europe’s worst migration crisis in decades and the EU depends on Ankara to enforce a deal to stem mass migration to Europe.