Turkey sanctioned further military action against Syria on Thursday and bombarded targets across the border with artillery for a second day, raising the stakes in a conflict that increasingly is bleeding outside Syrian territory.

Although both sides moved to calm tensions, Turkey's parliament overwhelmingly approved a bill allowing the military to conduct cross-border operations into Syria — making clear that Ankara has military options that do not involve its Western or Arab allies.

It was the most dramatic escalation in tensions between the countries, which were close allies before the revolt against Syrian President Bashar Assad began in March 2011. Over the past 18 months, however, Turkey has become one of the strongest critics of the Syrian regime, accusing it of savagery and massacres against the opposition.

The rebels who are trying to bring down Assad have used Turkey as their base, enraging a regime that accuses foreign countries of fomenting the unrest inside Syria.

The spark for the latest hostility was a mortar shell fired from Syria that slammed into a house in the Turkish border village of Akcakale on Wednesday, killing two women and three children.

"(The shell) hit my neighbor next door. His wife, his children died," villager Bakir Kutlugil told The Associated Press. "Now I worry whether the next one will hit me or my neighbor."

Mehmet Yasin, another villager, said he feared Turkey will get drawn into more violence. "They are warring over there anyway. Why should we battle against anyone?" he asked.

The Turkish response to the Syrian shelling was swift — it fired salvos of artillery rounds inside Syria, contacted its NATO allies and convened Parliament for a vote authorizing further cross-border military operations if necessary.

The bill opens the way for unilateral action by Turkey's armed forces inside Syria. Turkey has used a similar provision to repeatedly attack suspected Kurdish rebel positions in northern Iraq.

Syria's U.N. envoy said Thursday that his government was investigating the source of the cross-border shelling and did not want any escalation of violence with Turkey.

Ambassador Bashar Ja'afari said the Assad regime sent its "deepest condolences" to the families of the victims, but stopped short of an apology, pending the outcome of the investigation. He also urged Turkey to act "wisely, rationally" and prevent infiltration of "terrorists and insurgents" and the smuggling of arms across the border.

Turkish officials, however, characterized the statement as an apology.

Ja'afari said that the return shelling from Turkey early Thursday injured two Syrian army officials.

Syrian opposition figures in Akcakale, which has a clear sight line into Syria, said the targets of Turkey's retaliatory attacks included at least one tank and one anti-aircraft gun in the town of Tal Abyad in Raqqa province, where the Syrian regime and rebels are battling for control.

Some residents of Akcakale, fearful of more stray shells, abandoned their homes and spent the night on the streets. Others gathered outside the mayor's office, afraid to return to their homes as the dull thud of distant artillery fire rumbled.

The border violence has added a dangerous new dimension to Syria's civil war, dragging Syria's neighbors deeper into a conflict that activists say has already killed 30,000 people.

Still, both Syria and Turkey appear loath to see the situation spiral out of control.

Turkish Prime Minister Recep Tayyip Erdogan said Thursday that Turkey did not want war with Syria but was determined to protect its borders and its people.

"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."

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

Thursday's military strikes against Syria and the parliamentary vote authorizing further action were Turkey's strongest response yet to a series of serious infractions this year — including a June incident in which Syria shot down a Turkish military jet, killing its two pilots.

Turkey said the plane was in international airspace, countering Syrian claims that it was in Syrian airspace. At the time, Turkey reinforced its border with anti-aircraft missiles and threatened to target any approaching Syrian military elements, but there was no retaliatory attack or attempt to authorize military action.

In Washington, State Department spokeswoman Victoria Nuland said the U.S. believes Turkey's response was proportional and appropriate to "strengthen the deterrent effect so that these types of things don't happen again."

Fawaz A. Gerges, head of the Middle East Center at the London School of Economics, said the latest violence shows just how easily the simmering tensions can ignite into a maelstrom.

"For months, the two sides have been engaged in low-intensity warfare, and what we have seen is a dangerous escalation," he said. "The potential for an all-out war is out there and there is no doubt that even though neither side wants it, a war could erupt because of a miscalculation on either side."

Syria and Turkey have a fraught history.

Turkey, which shares a 566-mile (911-kilometer) frontier with Syria, nearly went to war with its neighbor over Syrian support for Turkish Kurdish rebels in the 1990s. Turkey threatened military action in 1998, forcing Syria to expel Kurdish rebel leader Abdullah Ocalan.

The relationship improved dramatically over the past decade since Bashar Assad came to power in 2000 and the two countries reached out to build economic ties.

At the same time, Turkey, NATO's biggest Muslim member, emerged as a regional power in the past decade, backed by a growing economy, emerging democratic credentials and historical and cultural links to neighbors. It pursued pragmatic links with authoritarian leaders, but shifted to a pro-democracy position as uprisings swept the Middle East and North Africa.

The crackdown in Syria is acutely uncomfortable for Turkey, which does not want to be seen as a bystander to atrocities on its doorstep. At the same time, it is wary of scenarios such as a "buffer zone" inside Syria that could plunge its troops into battles with Syrian forces, drag in other countries and undo its image as a regional mediator.

Turks have 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.

Yet Turkey is still unwilling to go it alone in Syria, and is anxious for any intervention to have the legitimacy conferred by a U.N. 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.

The Syrian conflict has left Assad an international pariah, although Iran, Russia and China have stood by their old ally. On a visit to Pakistan on Thursday, Russian Foreign Minister Sergey Lavrov expressed his government's concern over the escalation of tensions.

Speaking at a news conference in Islamabad, Lavrov said Syria has assured Russia that such an incident will not happen again.

"It is of great concern for us," Lavrov said. "This situation is deteriorating with every coming day."


Fraser reported from Ankara, Turkey. Associated Press writers Christopher Torchia in Istanbul, Elizabeth A. Kennedy in Beirut and Nahal Toosi in Islamabad contributed to this report.