ANKARA (Reuters) - Turkey demanded on Friday that Greece reconsider a decision not to extradite eight soldiers who fled to Greece after a failed coup last year, and threatened measures including scrapping a migration deal with Athens.

Eight Turkish soldiers, who fled to Greece in a helicopter and requested political asylum after a failed military coup against the government, are escorted by police officers as they arrive at the Supreme Court in Athens, Greece, January 26, 2017. REUTERS/Alkis Konstantinidis

Greece’s Supreme Court ruled on Thursday against extraditing the soldiers, who have sought political asylum, saying they feared for their lives in Turkey. Ankara says they were involved in the July 15 coup attempt and branded them traitors.

“We demanded that the eight soldiers be tried again. This is a political decision, Greece is protecting and hosting coup plotters,” Turkish Foreign Minister Mevlut Cavusoglu told state broadcaster TRT Haber.

“We are evaluating what we can do. There is a migration deal we signed, including a readmission deal with Greece, and we are evaluating what we can do, including the cancellation of the readmission deal with Greece,” Cavusoglu added.

A European Union spokeswoman said it was confident its cooperation with Turkey on migration, aimed at stemming the flow of refugees into Europe, will hold firm.

Greek Prime Minister Alexis Tsipras’ office responded to Turkey’s comments on Thursday and Friday that coup plotters were not welcome in Greece but the country’s justice system was independent and court rulings were respected.

“The Greek government has vehemently condemned ... the coup attempt and supported the democratically elected government in our neighboring country,” it said.

But it added that “within Greece, the sole authority for relevant decisions is the independent Greek justice system, whose verdicts are obviously binding.”

Relations between Greece and Turkey, neighbors 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.