ANKARA (Reuters) - President Tayyip Erdogan said on Tuesday the European Union’s decision to sanction Turkey over drilling off the coast of Cyprus could disrupt talks with the bloc, and he warned that Turkey could send captured Islamic State fighters to Europe.

EU foreign ministers on Monday agreed economic sanctions on Ankara for violating Cyprus’ maritime economic zone by drilling off the divided island.

Turkey, a formal candidate to join the EU despite worsening ties, criticised the decision and said it would not cease drilling in the eastern Mediterranean because it is operating on its own continental shelf or areas where Turkish Cypriots have rights.

Speaking in Ankara ahead of a visit to Washington, Erdogan slammed the EU’s decision and said Turkey was acting in line with its rights based on international law.

“Hey EU, know this: Turkey is not one of those countries you have come to know until now. We are a country that sits at the negotiating table with you...” Erdogan told reporters. “These negotiations may suddenly end.”

The EU relies on Ankara, which hosts more than 3.5 million refugees, to curb the arrival of migrants into Europe following a 2016 agreement to seal off the Aegean sea route. Erdogan has repeatedly warned that Turkey will allow refugees to travel to Europe unless it receives aid from European countries.

“You may take this lightly, but the these doors (to Europe) will open and these Daesh (Islamic State) members will be sent to you. Do not try to threaten Turkey over developments in Cyprus,” Erdogan said on Monday.

The island of Cyprus was divided in 1974 after a Turkish invasion triggered by a brief Greek-inspired coup. Since then, several peacemaking efforts have failed and the discovery of offshore resources has complicated the negotiations.

EU ties with NATO-ally Turkey have meanwhile worsened after years of stalemate on Ankara’s accession bid. With a worsening record on human rights in the aftermath of a failed coup in 2016, many EU states say Turkey does not meet democratic criteria to join the bloc.

The decision to impose economic sanctions on Ankara follows a separate move last month to stop arms sales to Turkey over its offensive against the Kurdish YPG militia in northeast Syria. Turkey’s western allies have said the offensive could hinder the fight against Islamic State, but Turkey has rejected the claims.

On Monday, Turkey said it had begun deporting Islamic State members it has captured, starting a programme to repatriate the detainees that has further strained ties with its European NATO allies.

“Whether they accept them or not, we will continue to send them back,” Erdogan said on Monday, referring to Islamic State detainees.