Ahmet Davutoglu said the army returned artillery fire after coming under attack from the terrorist PYD group based around Azaz in northern Syria. He stressed that the response was within Turkey’s rules of engagement.

Earlier, a military source told Anadolu Agency the Akcabaglar base in Kilis province was shelled by "PYD/PKK" forces -- referring to the Syrian Kurdish group and its affiliate PKK terrorist group, which has waged war on Turkey since 1984.

Azaz in Aleppo province has been the scene of recent heavy fighting and the PYD’s armed wing, YPG, have advanced to Azaz -- just six kilometers (four miles) from the Turkish border.

Davutoglu demanded the YPG withdraw from Azaz and the nearby Menagh military air base and warned the group against using either as a base to attack Turkey or Syrian opposition forces.

"The YPG has blood on their hands," he said.

"It is a terrorist organization. It is a group that cooperates with and compliments Russia on the ground."

The premier said Ankara would respond to the YPG’s cross-border activities.

"We will take every necessary step to ensure an environment that guarantees Turkey’s security, an environment without Daesh, the Syrian regime or the PYD," he told a news conference in Erzincan, northeast Turkey.

Davutoglu said he informed U.S. Vice President Joe Biden about Turkey’s concerns via a telephone call, adding Biden had said he would pass on his remarks to the "relevant parties".

Biden visited Istanbul last month to discuss the Syrian crisis during which he also met Turkish President Recep Tayyip Erdogan and Davutoglu.

During the press conference, Davutoglu said the close cooperation between both countries is "necessary".

"During [Biden’s] visit, we agreed on some issues. These are not secrets on principle. Firstly, YPG should not cross the Euphrates River and should not do anything to bother Turkey.

"Secondly, Russian offensive to Aleppo should not turn into something that would trigger immigration wave.

"Third: A joint support of [Syrian] opposition’s offensive against Daesh on Marea-Jarabulus line. When Biden asked the latest developments, I told him that there has been no development regarding these three fundamental principles as we wish to see," Davutoglu said.

Davutoglu said YPG forces did not cross the river line; but they instead tried to invade Azaz by crossing into Afrin’s east, which has been under Kurds’ control.

"YPG will remain within their lines during clashes," Davutoglu said.

The U.S. supports the YPG in Syria.

Davutoglu also said Aleppo, Syria’s second biggest city, had been under siege since last week, when the humanitarian aid corridor between Turkey and the city was cut off by a Russian-backed government offensive.

'Forces using PYD'

In an apparent reference to Russia, the prime minister said "forces using the PYD" had sought to cause a "massive refugee influx" towards Turkey.

He added that Ankara was ready to take further measures to defend its borders.

Referring to last Monday’s meeting with German Chancellor Angela Merkel, Davutoglu said they had "agreed that the latest attacks on Aleppo targeted Turkey, and through Turkey, Europe".

Around 2.7 million Syrian refugees have crossed into Turkey since the civil war began and the latest offensive has seen tens of thousands more flock to the Turkish border.

"Meetings between Russia and the U.S. continue," Davutoglu said.

"And behold, after every meeting, the siege on Aleppo gets tighter and the number of refugees coming from Aleppo increases." He added: "Somebody needs to draw a line against Russia and raise their voice."

In an admonition to the international community, Davutoglu accused it of complicity in Russia’s attacks on civilians.

"The international community that cannot say ‘stop’ to the ones who are air bombarding to displace hundreds of thousands of people have unfortunately become partners of the crime in Syria today," he said.

In Washington, U.S. State Department spokesman John Kirby urged Turkey to halt its cross-border artillery fire and called on the YPG and its affiliated forces "not to take advantage of a confused situation by seizing new territory".

He added: “"Turkey and the YPG share a serious threat of ISIL [Daesh] poised just to the east of the Azaz corridor. We continue to encourage all parties to focus on this common threat, which has not subsided, and to work towards a cessation of hostilities."