Leaders of European countries affected by waves of refugees and migrants from North Africa and the Middle East have agreed that it’s essential to work closely with Turkey to deal with the crisis. The leaders of 10 nations met in Vienna yesterday. They agreed to urge the EU to handle the relationship with Turkey appropriately and to strengthen the EU’s border controls.

The EU and the Turkey have an agreement under which Turkey takes back migrants and refugees. But the relationship has soured as Turkish President Tayyip Erdogan’s government cracked down on opposition forces after a failed coup attempt in July.

Hungarian Prime Minister Viktor Orban said at a news conference following the meeting that the EU should be prepared for the possible collapse of the deal with Turkey. Orban is a vocal advocate of controlling the intake of refugees. The EU plans to discuss the refugee crisis and its relationship with Turkey at next month’s summit.