ISTANBUL (Reuters) - Turkey’s defense minister warned on Friday that Ankara would retaliate against any threatening moves by the Kurdish YPG militia in Syria and welcomed a U.S. pledge to take back weapons from the group after the defeat of Islamic State.

FILE PHOTO: Turkey's Defence Minister Fikri Isik answers a question during an interview with Reuters in Ankara, Turkey, August 5, 2016. REUTERS/Tumay Berkin

Washington sees the YPG as an essential ally in the campaign to defeat Islamic State in its Raqqa stronghold. Ankara considers it a terrorist group tied to militants who have fought an insurgency in southeast Turkey since the mid-1980s.

Turkish Defense Minister Fikri Isik told broadcaster NTV a letter sent to him by U.S. Defense Secretary Jim Mattis regarding the weapons given to the YPG was a “positive step” but “implementation is essential”.

Turkey has said supplies to the YPG have in the past ended up in PKK hands, describing any weapon given to them as a threat to its security. Isik warned of retaliation for any action by the Syrian militia.

“Any move by the YPG toward Turkey will be answered immediately,” the minister said.

“Threats that might emerge after the Raqqa operation are already being evaluated. We will implement steps that will completely secure the border,” he added. “It is Turkey’s right to eliminate terror threats across its borders”.

The fight for Raqqa began two weeks ago, putting pressure on Islamic State, which also faces defeat in its Iraqi stronghold, Mosul.

The British-based Syrian Observatory for Human Rights said on Wednesday Turkey had sent reinforcements, including troops, vehicles and equipment into Syria, toward areas south of Azaz town, which is held by Turkish-backed Syrian rebels. The YPG controls areas south of Azaz.

A rebel from a Turkish-backed group has also said Turkey sent in more forces but there has been no confirmation from officials in Ankara.

Turkey opened an offensive in northern Syria in August last year, sending tanks and warplanes across the border to support Syrian rebels fighting both Islamic State and the YPG.

It helped them carve out a big portion of northern Syria, helping ensure the YPG and its allies could not link the 400-km (250-mile) stretch of territory they hold in the north and northeast with the pocket they hold west of Azaz.