U.S. Secretary of State Mike Pompeo said on Saturday he was optimistic that a “good outcome” could be reached between Turkey and Syrian Kurdish groups, after speaking to the Turkish foreign minister.

“We recognise the Turkish people’s right to defend their country from terrorists, but we also know that those … who are not terrorists and fighting alongside us for all this time deserve to be protected,” Pompeo told reporters.

“There are many details to be worked out but I am optimistic we can achieve a good outcome,” he said.

Kurdish-led groups who control swathes of northern Syria fear an attack from Turkey in the wake of U.S. President Donald Trump’s decision to withdraw troops from their region. Turkey sees the Kurdish YPG militia so close to its border as a security threat. Turkish President Tayyip Erdogan has vowed to crush the group.

Speaking in the United Arab Emirates capital Abu Dhabi as part of a regional tour, Pompeo also said the withdrawal of U.S. troops from Syria is a “tactical change” and does not alter U.S. military capacity to counter Islamic State and Iran.