KIEV/BEIRUT (Reuters) - Turkey on Monday accused Russia of an “obvious war crime” after missile attacks in northern Syria killed scores of people, and warned Kurdish militia fighters there they would face the “harshest reaction” if they tried to capture a town near the Turkish border.

An offensive supported by Russian bombing and Iranian-backed Shi’ite militias has brought the Syrian army to within 25 km (15 miles) of Turkey’s frontier. The Kurdish YPG militia - which Turkey regards as a hostile insurgent force - has exploited the situation, seizing ground from Syrian rebels to extend its presence along the border.

Almost 50 civilians were killed when missiles hit at least five medical facilities and two schools in rebel-held areas of Syria on Monday, according to the United Nations, which called the attacks a blatant violation of international law.

At least 14 were killed in the northern town of Azaz, the last rebel stronghold before the border with Turkey, when missiles hit a children’s hospital and a school sheltering refugees, a medic and two residents said. Missiles also hit a hospital in the town of Marat Numan in the province of Idlib, south of Aleppo.

Turkish Prime Minister Ahmet Davutoglu said a Russian missile had hit the buildings and that many civilians including children had been killed. Turkey’s foreign ministry accused Russia of carrying out an “obvious war crime.”

But Russian Health Minister Veronika Skvortsova said Russian air strikes were targeting Islamic State infrastructure and she had no reason to believe that Russian planes had bombed civilian sites in Idlib.

“We are confident that (there is) no way could it be done by our defense forces. This contradicts our ideology,” she said in Geneva. Syria’s ambassador to Russia said U.S. war planes were responsible.

White House national security adviser Susan Rice on Monday condemned in the “strongest terms” the intensified bombing of northern Syria, adding that it ran counter to commitments to reduce hostilities made by major powers last week in Munich.

The Syrian civil war, reshaped by Russia’s intervention last September, has gone into an even higher gear since the United Nations sought to revive peace talks. The talks in Geneva were suspended earlier this month before they got off the ground.

World powers agreed in Munich on Friday to a cessation of hostilities in Syria to allow humanitarian aid to be delivered, but the deal does not take effect until the end of this week and was not signed by any warring parties.

Turkey shelled YPG positions for a third straight day on Monday to try to stop its fighters seizing Azaz, just 8 km from the border. Ankara fears the Kurdish militia, backed by Russia, is trying to secure the last stretch of around 100 km along the Syrian border not already under its control.

“We will not allow Azaz to fall,” Davutoglu told reporters on his plane on the way to Ukraine. “If they approach again they will see the harshest reaction,” he said.

The standoff has increased the risk of direct confrontation between Russia and NATO member Turkey.

Slideshow ( 10 images )

U.N ENVOY IN DAMASCUS

U.N. Syria envoy Staffan de Mistura made a surprise visit to Damascus on Monday and will hold talks with Syria’s foreign minister on Tuesday, a Syrian government official told Reuters. A senior UN official later confirmed that de Mistura had arrived in Syria for an unscheduled visit to “follow up on commitments made in Munich.”

But in a further clouding of the Munich deal, Syrian President Bashar al-Assad said on Monday that any ceasefire did not mean each side had to stop using weapons, and that nobody was capable of securing the conditions for one within a week.

Slideshow ( 10 images )

At a news conference in Kiev, Turkey’s prime minister doubted Russia’s commitment to any deal to cease hostilities, pointing to comments from Moscow that it would continue its air strikes regardless.

“They want to have just two options in front of the international community: Daesh or Assad,” Davutoglu said, using an Arabic acronym for Islamic State.

Turkey is enraged by the expansion of Kurdish influence in northern Syria, fearing it will encourage separatist ambitions among its own restive Kurds. Ankara considers the YPG a terrorist group.

Davutoglu said Turkey would make the Menagh air base north of the city of Aleppo “unusable” if the YPG, which seized it over the weekend from Syrian insurgents, did not withdraw.

Turkish Defense Minister Ismet Yilmaz said Ankara was not considering sending troops to Syria, according to the state-run Anadolu Agency.

Syria’s rebels, some backed by the United States, Turkey and their allies, say the YPG is fighting with the Syrian military and its backers - including Russia - against them in the five-year-old civil war. The YPG denies this.

South of Azaz, the Kurdish-backed Syria Democratic Forces (SDF) alliance, of which the YPG is a member, took around 70 percent of the town of Tal Rifaat, according to the Syrian Observatory, which monitors the war.

HOSPITALS HIT

Tens of thousands have fled to Azaz from towns and villages where there is heavy fighting between the Syrian army and militias.

“We have been moving scores of screaming children from the hospital,” said medic Juma Rahal, following the missile strikes. At least two children were killed and ambulances ferried scores of injured people to Turkey for treatment, he said.

French charity Médecins Sans Frontières (MSF) said seven people were killed and at least eight staff were missing after missiles hit a hospital in the province of Idlib, west of Aleppo, in a separate incident.

“The author of the strike is clearly ... either the government or Russia,” MSF president Mego Terzian said.