ANKARA (Reuters) - Turkey’s President Tayyip Erdogan rebuked Washington’s national security adviser on Tuesday for demanding that his country not attack Kurdish fighters in Syria, accusing him of complicating President Donald Trump’s plan to withdraw U.S. troops.

Erdogan said John Bolton, who held talks with Turkish officials in Ankara on Tuesday but left without meeting the president, “made a serious mistake” in setting conditions for Turkey’s military role after the U.S. pullout.

The rebuke highlights the difficulties in implementing Trump’s goal of bringing home some 2,000 U.S. troops stationed in Syria. Trump’s plan, clouded by mixed messages from the president and his administration, hinges on Turkish cooperation to secure a huge swathe of northeast Syria as the United States departs.

Bolton made the case to Turkish officials for the need for guarantees that U.S.-backed Kurdish fighters in the campaign against Islamic State would not be harmed after a U.S. withdrawal, a senior U.S. official said. But there were no signs of any agreement between the two North Atlantic Treaty Organization partners, whose relations have been strained over Syria and other issues.

Trump’s abrupt announcement last month sparked concern among officials in Washington and some Western allies, and was a major factor in Defence Secretary Jim Mattis’ decision to resign. It also alarmed the YPG, Washington’s main partner against Islamic State in Syria.

But the plan was lauded by Ankara. Turkey considers the YPG a terrorist organisation and an extension of the outlawed Kurdistan Workers Party (PKK), which has waged a three-decade insurgency in its largely Kurdish southeast. Washington’s support for the militia has infuriated Turkey.

Before arriving in Turkey, Bolton said Turkey must coordinate military action with the United States and no U.S. withdrawal would take place until Ankara guaranteed the Kurdish fighters would be safe.

Slideshow ( 5 images )

But Erdogan, who has long argued that the YPG is no different from the Islamic State militants, said the condition was unacceptable.

“If they are terrorists, we will do what is necessary no matter where they come from,” he told members of his AK Party in parliament.

“Bolton has made a serious mistake and whoever thinks like this has also made a mistake. It is not possible for us to make compromises on this point.”

The Turkish president accused members of Trump’s administration of trying to muddy a clear understanding between the two countries over the withdrawal.

“Different voices have started emerging from different segments of the administration,” Erdogan said.

Slideshow ( 5 images )

FOCUS ON YPG

A senior Turkish official said Bolton had asked to see Erdogan but his earlier remarks may have been a factor in the meeting not going ahead. Erdogan later told reporters there was no need for him to meet Bolton.

U.S. officials denied that Bolton felt snubbed. “The U.S. Embassy in Turkey requested a series of meetings, but due to scheduling conflicts, one with President Erdogan was never confirmed,” said Garrett Marquis, Bolton’s spokesman.

Instead, Bolton met his Turkish counterpart Ibrahim Kalin as well as the deputy defence and foreign ministers, while on a quick tour to the region to manage fallout from Trump’s abrupt decision on Syria.

Bolton also told the Turkish officials the U.S. withdrawal would be done in a deliberate and orderly fashion and that at this point the United States had no plans to abandon its Syria base at al-Tanf near the Iraqi border, the senior U.S. official said.

On a visit to Jordan on Tuesday, Secretary of State Mike Pompeo said the withdrawal would not jeopardise Washington’s efforts to counter regional threats from Islamic State and Iran.

ECONOMIC FRICTION

The friction with the United States has had economic consequences for Turkey. A diplomatic rift last year - now partly repaired - was one of the factors that sent Turkey's lira TRYTOM=D3 into a tailspin over the summer.

The currency slipped again on Tuesday, weakening some 2 percent against the dollar.

Ahead of Tuesday’s talks, Turkey’s Hurriyet newspaper said Ankara would ask U.S. officials either to hand over its military bases in Syria to Ankara or to destroy them. It cited unspecified sources as saying Turkey would not accept the handover of what it said were 22 U.S. military bases to the YPG.

A senior Turkish security official told Reuters last week Washington needed to allow Turkey to use its bases in Syria. Kalin said Turkey wanted the bases emptied and handed over to “local elements.”

Following the meeting, Kalin said there was no slowdown in the U.S. withdrawal from Syria and that Turkey was focussed on what happens to U.S. bases in Syria and the weapons Washington has given the YPG.

Bolton was joined by U.S. Chairman of the Joint Chiefs of Staff General Joseph Dunford and U.S. special Syria envoy James Jeffrey for the talks with Kalin, who is Erdogan’s spokesman and deputy head of Turkey’s security and foreign policies board.