Turkey's parliament has authorised cross-border military action against Syria, if deemed necessary by the government.
The mandate, valid for one year, was passed by 320 votes in the 550-seat Turkish parliament, the Anatolia news agency reported on Thursday.
Besir Atalay, Turkey's deputy prime minister, said authorising the use of force in Syria was not a declaration of war but was intended as a deterrent.
The vote came as Turkey resumed shelling Syrian government military positions on Thursday morning in retaliation for a mortar attack which landed over its border in southeastern Turkey killing five of its citizens - a woman and four children from the same family.
"The Syrian side has admitted what it did and apologised," Atalay said.
Turkish state media said that the attacks by artillery units based in the border town of Akcakale were continuing.
Syrian troops killed
Several Syrian troops were killed as a result of overnight Turkish shelling at a base near the Syrian border town of Tal al-Abyad, a UK-based Syrian activist group said.
An aide to Recep Tayyip Erdogan, Turkey's prime minister, said on Thursday that his country had no intention of declaring war on Syria, pointing out that the shelling - now in its second day - should be seen as a "warning" to the authorities in Damascus.
"Turkey has no interest in a war with Syria. But Turkey is capable of protecting its borders and will retaliate when necessary," Ibrahim Kalin, a senior adviser to Erdogan, said on his Twitter account .
"Political, diplomatic initiatives will continue," he said.
The parliament had already been due to vote on Thursday on extending a five-year-old authorisation for foreign military operations, an agreement originally intended to allow strikes on Kurdish bases in northern Iraq.
But the memorandum signed by Erdogan and sent to parliament overnight said that despite repeated warnings and diplomatic initiatives, the Syrian military had launched aggressive action against Turkish territory, presenting "additional risks".
"This situation has reached a level of creating a serious threat and risks to our national security. At this point the need has emerged to take the necessary measures to act promptly and swiftly against additional risks and threats," it said.
In the most serious cross-border escalation of the 18-month uprising in Syria, Turkey hit back after what it called "the last straw" when a mortar hit a residential neighbourhood of the southern border town of Akcakale on Wednesday.
Syrian mortar attack
Security sources said the mortar had come from near Tal al-Abyad and that Turkey was increasing the number of troops along its border.
"Our armed forces in the border region responded immediately to this abominable attack in line with their rules of engagement; targets were struck through artillery fire against places in Syria identified by radar," Erdogan's office said in a statement late on Wednesday.
"Turkey will never leave unanswered such kinds of provocation by the Syrian regime against our national security."
Syria said it was investigating the source of the mortar bomb and urged restraint. Information Minister Omran Zoabi conveyed his condolences to the Turkish people, saying his country respected the sovereignty of neighbouring countries.
Following the attack, Bulent Arinc, the deputy prime minister, said Turkey was "not blinded by rage".
"There is definitely a response to it [the attack] in international law ... We are not blinded by rage, but we will protect our rights to the end in the face of such an attack on our soil that killed our people."
Al Jazeera's Andrew Simmons , reporting from Antakya on the Turkish-Syrian border, said Arinc's mention of "certain responsibilities" contained within NATO treaty articles, could mean that Turkey responded without consulting international bodies first.
NATO said it stood by member-nation Turkey and urged Syria to put an end to "flagrant violations of international law".
Questions of war
Al Jazeera's Anita McNaught, reporting from Akcakale, said that one has to ask the question of whether Syria "would want to draw Turkey into the conflict, and would Turkey want this to be the start of a larger and widening escalation of the battle regionally".
The US-led Western military alliance held an urgent late night meeting in Brussels to discuss the matter.
That meeting was only the second time in NATO's 63-year history that members had convened under Article 4 of its charter which provides for consultations when a member state feels its territorial integrity, political independence or security is under threat.
Turkey also asked the UN Security Council to take the "necessary action" to stop Syrian "aggression".
In a letter to the president of the 15-nation Security Council, Ertugrul Apakan, Turkey's UN ambassador, called the firing of the mortar bomb "a breach of international peace and security".
UN diplomats said Security Council members hoped it would issue a non-binding statement on Thursday that would condemn the mortar attack "in the strongest terms" and demand an end to violations of Turkey's territorial sovereignty.
Members had hoped to issue the statement on Wednesday, but Russia - a staunch ally of Syria's, which along with China has vetoed three UN resolutions condemning President Bashar al-Assad's government - asked for a delay, diplomats said.