BEIRUT (Reuters) - The U.S.-backed Syrian Democratic Forces warned on Thursday of the prospect of fierce confrontation with the Turkish army in northwestern Syria if it attacks SDF areas, and said this would undermine the assault on Islamic State at Raqqa.

Naser Haj Mansour, a senior SDF official, told Reuters the SDF had taken a decision to confront Turkish forces “if they try to go beyond the known lines” in the areas near Aleppo where the sides exchanged fire on Wednesday.

“Certainly there is a big possibility of open and fierce confrontations in this area, particularly given that the SDF is equipped and prepared,” he said. “If it (the Turkish army)attacks we will defend, and if it attacks there will be clashes.”

Turkey has recently deployed reinforcements into the area, according to Turkey-backed rebel groups, prompting SDF concern that Ankara is planning to attack nearby areas that are under SDF control.

The SDF is an alliance of Kurdish and Arab groups spearheaded by the YPG militia which Turkey views as an extension of the Kurdistan Workers Party (PKK), which has waged a three-decade insurgency in Turkey.

The Turkish military said on Wednesday it had fired artillery at YPG positions south of the town of Azaz in what it said was a response to the YPG’s targeting of Turkey-backed rebels. Mansour said the SDF had responded to Turkish shelling.

On Thursday, Turkey’s deputy prime minister, Numan Kurtulmus, said it would retaliate against any cross-border gunfire from the YPG and not remain silent in the face of anti-Turkey activities by terrorist groups abroad.

Kurtulmus also reiterated Ankara’s opposition to the U.S. arming of YPG combatants and said U.S. officials would understand this was the “wrong path”.

Mansour said an attack on SDF-controlled areas would “do great harm” to the U.S.-backed Raqqa assault by drawing some SDF fighters away from front lines.

The SDF launched a long-anticipated assault on Raqqa city earlier this month. Mansour said SDF forces would soon completely besiege the city by closing the last remaining way out from the south. “There is a plan to impose a complete siege, but if this will take a day or two days, I can’t say,” he said.

Later the Syrian Observatory for Human Rights, a war monitor, said the SDF had fully encircled the city after closing the militants’ last way out from the south.

Raqqa is bordered to the south by the River Euphrates.

He said that Islamic State fighters were focusing their efforts on defending certain key positions in the city, “meaning they are conducting fierce battles in some strategic positions”.

“This may be due to a shortage of numbers and ammunition,” he said. He also said the Islamic State was deploying fewer car bombs than in previous battles and this also indicated a shortage of supplies.

Mansour said it could be “maybe more than a month or a month and half” before the SDF would be able to fully capture the city.

The Syrian Observatory said a group of 30 to 40 Islamic State fighters was able on Thursday for the first time to regain positions in districts of the city that had been captured by the SDF at the start of the campaign.