ANKARA, Turkey (AP) — Turkish President Recep Tayyip Erdogan accused the U.S. national security adviser of making “a very serious mistake” Tuesday by demanding that Ankara guarantee the safety of Kurdish fighters in northeastern Syria before the U.S. withdraws its troops from the war-torn country.

A strained morning of negotiation in Turkey ended without assurances of protection for forces that fought alongside U.S. troops against the Islamic State group, and indeed brought them fresh new threats from Turkey. The diplomatic setback raised fresh questions about how the U.S. would protect its allies in the fight against IS and about the pace of the drawdown of U.S. forces in Syria.

“John Bolton has made a very serious mistake. We cannot make any concessions in this regard,” Erdogan said Tuesday, just before Bolton left the country with tensions between the NATO allies at new highs. He added that Ankara’s preparations for a new military offensive against what the Turkish leader describes as terror groups in Syria are “to a large extent” complete.

Bolton had insisted that Turkey refrain from conducting any operation unless it was approved by and coordinated with the U.S. Turkey’s presidential spokesman fired back publicly that Turkey would not seek permission from its allies to conduct a military offensive against Syrian Kurdish fighters, but was willing to coordinate operations.

A senior administration official said Erdogan’s comments did not reflect President Donald Trump’s understanding of his Dec. 23 conversation with the Turkish leader, days after the U.S. president announced his intent to withdraw American troops from northeastern Syria. Trump “thought he got a commitment from Erdogan” to protect the Kurds, the official said, speaking on the condition of anonymity because the official wasn’t authorized to speak on the record.

An official at Tuesday’s meeting between Bolton and senior Turkish officials said presidential spokesman Ibrahim Kalin stated that Erdogan committed that Turkey would not take offensive action while U.S. forces were there.

Bolton departed Turkey without meeting with Erdogan in an apparent snub by the Turks — the meeting had been expected for days. A spokesman for Bolton said U.S. officials were told Erdogan cited the local election season and a speech to parliament for not meeting with him.

In the more than two-hour meeting with Kalin, Bolton outlined five U.S. principles for the Syria drawdown, including that “the United States opposes any mistreatment of opposition forces who fought with us against ISIS.”

In the high-stakes session in Ankara’s presidential complex, Bolton also rebuked Erdogan’s column in The New York Times, in which the Turkish leader restated his position that the Syrian Defense Forces were members of terrorist groups and criticized the U.S. air campaign against the Islamic State.

An official at the meeting said Bolton told Kalin that Erdogan’s op-ed was “wrong and offensive.”

The official added that the U.S. stuck by Trump’s request that the Kurds who fought with the U.S. not be mistreated, and the Turks stuck by their position that the Kurds “are terrorist groups and they’re free to go after them.”

Trump abruptly announced last month he intended to withdraw U.S. troops from Syria, and the U.S. has sent mixed signals over how soon that would be accomplished. Bolton’s trip to the Mideast was aimed at assuring allies it would not be done precipitously.

But Kalin told reporters after talks with Bolton there is no slowdown in the timetable for U.S. withdrawal from Syria. He said U.S. officials have said during their discussions that the withdrawal could take place within “120 days.”

Kalin said talks with Bolton focused on how the U.S. would collect the weapons that were given to Kurdish militia fighting Islamic States as well as the future of U.S. bases in Syria. He said he handed over two dossiers to Bolton — one on Turkish help to Kurdish populations in Iraq and Syria, the other on the Kurdish militias’ “criminal activities and human rights violations.”

A Bolton spokesman, Garrett Marquis, said in a statement that Bolton and Turkish officials “had a productive discussion of the President’s decision to withdraw at a proper pace from Northeast Syria.”

But Erdogan, for his part, said Bolton had “made a very serious mistake. Whoever thinks this way is also mistaken. We cannot make any concession in this regard and those involved in a terror corridor” in Syria would “receive the necessary punishment.”

Trump’s shifting timetable for pulling U.S. troops out of Syria has left allies and other players in the region confused and jockeying for influence over a withdrawal strategy that appeared to be a work in progress.

Trump faced widespread criticism that he was abandoning the Kurds in the face of Turkish threats. Officials said at the time that although many details of the withdrawal had not yet been finalized, they expected American forces to be out by mid-January.

After Bolton announced this week the U.S. pullout would not be as immediate as Trump had initially declared, U.S. allies were still seeking clarification from American diplomats.

Turkey insists its military actions are aimed at Kurdish fighters in Syria — the Syrian Kurdish Peoples Protection Units, or YPG — whom it regards as terrorists, and not against the Kurdish people. That has been Ankara longtime position and Turkey has rejected any role for Kurdish fighters in restoring peace to the war-torn region.

The Pentagon said Monday no U.S. troops have withdrawn from Syria yet but added that there is an “approved framework” for withdrawal.

Bolton maintained there is no fixed timetable for completing the drawdown, but insisted it was not an indefinite commitment to the region. Still, some 200 U.S. troops will remain in the vicinity of al-Tanf, in southern Syria, to counter growing Iranian activity in the region, he said.

___

Associated Press writers Suzan Fraser in Ankara, Turkey, Bassem Mroue in Beirut and Robert Burns and Matthew Lee in Washington contributed to this report.