BRUSSELS • The foundations of Turkey's agreement with the European Union to curb the flow of migrants into Greece are looking increasingly shaky.
With Turkey battling the Islamic State in Iraq and Syria (ISIS) and Kurdish militants at home and in neighbouring Syria, President Recep Tayyip Erdogan insists that he will not scale back the anti-terrorism legislation that European leaders say undermines democratic standards.
Even if he did, the EU may no longer be willing to make good on a promise to award visa-free travel to Turkey in return, said Mr Ian Lesser, senior director for foreign policy at the German Marshall Fund of the United States. Turkey has pledged to end the pact unless the EU delivers in October.
"Visa liberalisation for Turkey in the current circumstances is going to be a very tough sell in the EU," Mr Lesser said. "It's an explosive issue politically in Europe. I am very sceptical about the prospects for the refugee agreement."
Mr Erdogan's response to a failed coup last month, worries in Europe about Middle East terrorism and EU jitters over immigration after Britain's vote to leave the bloc in June have altered the political calculus since European leaders sealed their pact with Turkey in March.
Developments in Turkey since the attempted coup and the reaction of Erdogan in particular make it very difficult to grant visa liberalisation.
MR HRANT KOSTANYAN, a researcher at the Centre for European Policy Studies.
Throw in evidence that refugee flows across the Aegean Sea into Greece were dropping before the migrant accord and European governments may see fewer risks in snubbing Mr Erdogan than in keeping their word to him.
While big declines in refugee numbers followed the Turkey pact, EU governments had already closed transit routes north from Greece months earlier by reintroducing internal border checks - acts that also deterred would-be migrants.
The EU aims to lift those controls by the end of the year, but the checks could be extended until mid-2018 if the bloc opted to reduce its reliance on Turkey.
Turkey launched its biggest military operation in Syria on Wednesday, aiming to force ISIS militants away from its border and deter further advances by Syrian Kurds allied with Turkish separatists.
At home, Mr Erdogan has declared a three-month state of emergency since the coup, jailed more than 20,000 suspects and removed almost 80,000 people from public duty since the July 15 putsch was put down.
"We're continuing on our way, defeating the ploys of all those who think they can cut us off with coups, terrorism, economic attacks, diplomatic games and political manoeuvres," Mr Erdogan said on Wednesday.
EU leaders turned to Turkey for help after almost a million people streamed into Greece last year. Heading north through the Balkans in a bid to reach Germany, the migrants stirred the fears of locals, opened up divisions among EU nations and fuelled a populist backlash against establishment parties.
The influx turned into a trickle after Turkey agreed to accept the return of people who had entered Greece illegally. In return, Mr Erdogan was promised hassle-free travel to Europe, €6 billion (S$9.2 billion) in migrant aid and faster progress in membership talks that began in 2005.
Five months later, it is visa liberalisation that is the sticking point. The anti-terror law is the main EU condition that remains unfulfilled, but even if Mr Erdogan did back down on that, the politics are tricky.
"Developments in Turkey since the attempted coup and the reaction of Erdogan in particular make it very difficult to grant visa liberalisation," said Mr Hrant Kostanyan, a researcher at the Centre for European Policy Studies .
This week, Turkey recalled its ambassador in Vienna after Austria permitted a rally in support of Kurdish separatists. Last week, it was Sweden riling the Turks when Foreign Minister Margot Wallstroem criticised changes to their laws on child sex abuse.
Even if it were denied the EU's visa-free status, Turkey may be loath to pick another battle. It is trying to protect the economy from investor flight following the foiled coup, on top of the hostilities with ISIS and Kurdish groups.
Analyst Amanda Paul from the European Policy Centre said she believes Mr Erdogan will spare EU governments their dilemma.
"I don't think Turkey will meet the conditions," she said. "Turkey isn't going to adjust its anti-terror law at this point in time because of the security situation in the country."