ANKARA (Reuters) - The European Union’s top envoy to Turkey has resigned, EU officials said on Tuesday, after displaying what a Turkish minister said was disrespect for national values and for President Tayyip Erdogan.

Hansjoerg Haber, the Head of European Union Observers Mission in Georgia, speaks during an interview with Reuters in Tbilisi December 12, 2009. REUTERS/David Mdzinarishvili

The resignation of Hansjoerg Haber was a further sign of strained ties as Brussels tries to keep on track a landmark deal credited with curbing the flow of migrants to Europe.

It comes a month after Haber was summoned by Turkey’s foreign ministry over comments critical of Ankara’s handling of the migration accord. An EU official said his departure was “not for personal reasons”.

Omer Celik, Turkey’s EU affairs minister, told reporters it had become impossible for Haber to function in his role.

“The first rule for all diplomats is to respect national values, which include the common value of the office of the presidency,” Celik said during a visit to Slovakia in comments broadcast live by TRT television.

“The comments made by the ambassador in question violated this fundamental rule and the necessary reaction was made. Following that, I believe his work no longer had a function or meaning,” he said.

EU officials declined to comment on the reason for Haber’s resignation.

The 28-nation EU is dependent on Turkey to enforce a deal, criticised by rights groups, that has sharply cut the number of refugees and migrants reaching Greece, giving EU leaders breathing space after more than a million arrived last year.

But the EU is treading a delicate line, facing accusations of compromising its values by failing to be critical enough of Turkey’s deteriorating record on human rights and freedoms.

A spokeswoman for the European Commission said Haber would be leaving his role as of August.

“The successor will be appointed swiftly. We, as the European Union, continue to work with Turkey, Turkey is a key partner, it’s a candidate country. We have re-energised our relationship,” spokeswoman Maja Kocijancic said.

As a reward for keeping a lid on migration, Brussels promised Turkey to speed up its long-dormant EU accession talks.

EU envoys to Brussels were due to act on that commitment on Wednesday by formally agreeing to open negotiations on financial and budget issues with Ankara, diplomatic sources told Reuters.

COUNTER-TERRORISM LAWS

Haber was summoned by the foreign ministry in May to complain about comments he had made about the migration deal.

Turkish officials took offence at his use of an unflattering German saying, cited in local newspapers, to describe how a plan to ease visa restrictions for Turks travelling to Europe, part of the wider migrant deal, had run into problems.

Turkey and the EU have been discussing visa liberalisation since 2013 and agreed in March to go ahead with it as part of the deal to halt illegal immigration from Turkey to the EU.

But progress stalled when Brussels insisted that Ankara must also reform its counter-terrorism laws.

Prime Minister Binali Yildirim repeated on Tuesday that Turkey had no intention of changing its counter-terrorism laws, even if that meant the deal on visa-free travel collapsing.

The EU says Turkey must narrow its definition of terrorist crimes, which leads to extensive application of the law against intellectuals, Kurdish sympathisers and critics of Erdogan.

Turkey says its laws are crucial to its fight with Kurdish and Islamic State militants. Officials on both sides have said agreement on visa-free travel for Turks, unpopular in many EU states, is now unlikely until the autumn at the earliest.