Turkish Prime Minister Recep Tayyip Erdogan said Thursday that his country does not want war with Syria but it is determined to protect its borders and people.

Erdogan was speaking at a news conference held hours after Turkey's Parliament approved a bill authorizing the military to conduct cross-border operations in Syria after a deadly shelling from the Syrian territory killed five civilians.

Erdogan suggested the Syrian shelling was not accidental, saying that such shells had fallen on Turkish territory on seven previous occasions since the civil war began there.

mi-turkish-tank-rear-hatch-

A Turkish soldier steps out of an armoured vehicle in the southern border town of Akcakale on Thursday. Turkish parliament has given approval for the deployment of Turkish troops beyond its borders. (Bulent Kilic/AFP/Getty Images)

"We want peace and security and nothing else. We could never want to start a war, " Erdogan said. "Turkey is a country which is capable of protecting its people and borders. No one should attempt to test our determination on the issue."

The Anadolu Agency says legislators on Thursday voted in favour of the bill that gives the government authority for one year to send troops or warplanes to strike Syrian targets whenever it deems it necessary.

The UN Security Council Thursday strongly condemned Wednesday's shelling that killed five civilians — women and children — in the Turkish border town of Akcakale.

"This incident highlighted the grave impact the crisis in Syria has on the security of its neighbours and on regional peace and stability," the president of the security council said in a statement. 

"The members of the council demanded that such violations of international law stop immediately and are not repeated. The members of the security council called on the Syrian government to fully respect the sovereignty and territorial integrity of its neighbours."

Turkey hits Syrian targets

Earlier Thursday, Turkey fired on Syrian targets for a second day. The move adds a dangerous new dimension to a conflict that is pulling Syria's neighbours deeper into what already resembles a proxy conflict.

Turkey has had a similar measure in place for years for northern Iraq, where its big guns and jets periodically attack Kurdish militants.

Still, there is a distinction between the prospect of retaliatory strikes by Turkey, most likely in the form of more artillery barrages and possibly even airstrikes in the border region, and any decision to send troops into the Syrian maelstrom.

Turkish leaders are acutely aware of the risks of open-ended intervention, especially without the support of an international coalition; observers do not expect robust action from the United States ahead of the presidential vote next month.

Iran's support for the Syrian regime, a counter to backing for the opposition from Turkey, Qatar, Saudi Arabia and other countries, has raised worries about increasing sectarianism and the spread of the conflict.

Mortar strike kills 5 in Turkish village

The cross-border tensions escalated on Wednesday after a shell fired from inside Syria landed on a home in the Turkish village of Akcakale, killing a woman, her three daughters and another woman, and wounding at least 10 others, according to Turkish media.

The Syrian mortar shell damaged the door and walls of a house in Akcakale, while shrapnel drilled holes and shattered windows of neighbouring houses and shops. Some residents of Akcakale abandoned their homes close to the border and spent the night on the streets. Others gathered outside the local mayor's office, afraid to return to their homes as the dull thud of distant artillery fire rumbled across the town.

mi-turkish-down-shelled-300

Smoke rises after the shelling attack in Akcakale, Turkey, on Wednesday. (Anatolia/Associated Press)

The village on the Syrian side had been the focus of recent fighting between Syrian forces and rebels who eventually dislodged them; regime troops have continued to lob shells at the area from a distance.

Turkish response was prompt. It fired salvos of artillery rounds deep inside Syria. The NATO military alliance, of which Turkey is a member, met at an emergency session in Brussels, condemned the attack on Turkey and demanded "the immediate cessation of such aggressive acts against an ally." It also urged the Syrian regime to "put an end to flagrant violations of international law."

Yalcin Akdogan, a legislator and adviser to Turkish Prime Minister Recep Tayyip Erdogan, said "military targets" were shelled as a deterrent.

"The process that will follow from now will depend on Syria's position," he said.

Another aide to the prime minister said Turkey has no intention of declaring war on Syria but that the bill being debated in parliament on Thursday was intended to warn Syria. He spoke on condition of anonymity because civil servants are not allowed to speak to journalists without prior authorization.

Police on Thursday fired tear gas to disperse a group of anti-war activists who tried to march to parliament while the bill was being debated, according to Turkey's Dogan news agency.

Mustafa Guclu, a witness in Akcakale, said the Turkish military fired five rounds of artillery "after midnight" and another round around 5 a.m. on Thursday.

Syria expresses condolences

Syrian Information Minister Omran al-Zoubi, meanwhile, offered his "sincerest condolences on behalf of the Syrian government to the family of the deceased and the Turkish people."

mi-turkey-damage-300-153355

People walk inside the courtyard of the house where five people were killed after mortar fire from Syria. (Miguel Medina/AFP/Getty Images)

He appeared to be trying to reduce tensions, although he said Turkey must do more to control its borders and "prevent militants and terrorists from sneaking across."

The Turkish retaliatory shelling and steps to authorize possible military intervention is the latest in a series of events that have sharply escalated tensions between the former allies.

In June, Turkey reinforced its border with anti-aircraft missiles and threatened to target any approaching Syrian military elements after Syrian forces brought down a Turkish jet, killing its two pilots. Turkey said the plane was in international airspace, countering Syrian claims that it was in Syrian airspace.

Syrian rebel groups have been using Turkish territory as a base for their operations against the troops of Syrian President Bashar al-Assad. Thousands have died and hundreds of thousands have fled their homes since the start of the war in Syria last year.

There is concern in Turkey that the Syrian chaos could have a destabilizing effect on Turkey's own communities; some observers have attributed a sharp rise in violence by Kurdish rebels in Turkey to militant efforts to take advantage of the regional uncertainty.

Turkey is still loath to go it alone in Syria, and is anxious for any intervention to have the legitimacy conferred by a UN resolution or the involvement of a broad group of allies.

Turkey is mindful in part of inconclusive ground missions, mostly in the 1990s, against Kurdish guerrillas based in northern Iraq, as well as the bitter lessons of being seen as an occupying power that are associated with the U.S.-led invasion in Iraq. Reaching deeper into history, Turkey is aware of Mideast sensibilities over Ottoman rule over much of the region.

Turks have already grown weary of the burden of involvement in the Syrian conflict, which includes the hosting of 90,000 Syrian refugees in camps along the border. So Ankara is likely to act with some degree of restraint unless it suffers more casualties from Syrian fire in the days ahead.