(CNN) -- Turkey fired on Syrian government targets in response to the shelling of a Turkish border town in which five civilians were killed Wednesday, according to Prime Minister Recep Tayyip Erdogan's office.
The town of Akcakale "was hit by artillery fire belonging to the Syrian regime forces," a statement from Erdogan's office said, in the first clear assertion of blame for the shelling.
"Our armed forces on the border responded immediately to this atrocious attack within the rules of engagement, and points in Syria determined by radar were hit with artillery fire," it said. "Turkey, within the confines of the rules of engagement and international law, will never leave these types of provocations aimed at our national security unanswered."
The retaliatory artillery fire marks a significant increase in tension between the two countries, and CNN affiliate CNN Turk reported that witnesses observed intermittent artillery fire from Turkey into Syria continuing into the early hours Thursday.
Syrian authorities are "offering sincerest condolences on behalf of the Syrian government to the family of the deceased and the Turkish people" and are investigating the source of the gunfire, according to the state-run Syrian Arab News Agency (SANA).
"In case of border incidents that occur between any two neighboring countries, countries and governments must act wisely, rationally and responsibly, particularly since there's a special condition on the Syrian-Turkish borders in terms of the presence of undisciplined terrorist groups spread across the borders who have varying agendas and identities," said Syrian Information Minister Omran al-Zoubi.
Opposition groups in Syria said artillery fire from Turkey fell on a government military center near Tal Abyad in northern Syria's Raqqa province. Turkish military reinforcements are deployed near the border, they added.
The artillery shell fired into Turkey came from Tal Abyad, according to Turkey's semiofficial Anadolu news agency.
The North Atlantic Council, NATO's most senior political governing body, said it stands by Turkey.
The alliance "demands the immediate cessation of such aggressive acts against an ally, and urges the Syrian regime to put an end to flagrant violations of international law," the council said after an emergency meeting. The Syrian government has a recent pattern of "aggressive attacks" at NATO's southeastern border, it said.
Akcakale Mayor Abdulhakim Ayhan said earlier that three children, their mother and a female neighbor died when a house was hit. Two police officers were among those hurt, he said.
Nine people were injured when the shell landed on the town in Sanliurfa province, near the Syrian border, the Turkish prime minister's statement said.
Relations between Turkey and Syria were already under strain over Damascus' response to an 18-month-long uprising against the government of President Bashar al-Assad.
A senior U.S. defense official said the Pentagon is watching the situation with some degree of concern, "but at this point, there's nothing to suggest it's going to become a broader conflict."
The official said the reciprocal fire appeared to be a smaller-scale border skirmish rather than a large-scale aerial bombardment.
"We think this is Turkey basically saying, 'Don't mess with us. Whatever is going on inside Syria, don't mess with us,'" the official told CNN.
Both nations would have an interest in not allowing the conflict to escalate, according to the official.
"In some ways, Turkey would have more to lose in that kind of fight than Syria. They've already got a potential refugee problem coming from Syria, and a fight would only make that worse, the official said, adding that "Syria has so many problems right now, the last thing the government needs is to add another."
Turkish Foreign Minister Ahmet Davutoglu called U.N. Secretary-General Ban Ki-moon to express his government's "deepest concern" about the shelling, U.N. spokesman Martin Nesirky said. Before launching its military strike against Syrian targets Wednesday, Turkey reached out to NATO and U.N. chiefs.
Ban issued a statement expressing condolences to the shelling victims in Turkey. He called on Syria to respect the territorial integrity of its neighbors.
The U.N. Security Council privately discussed the situation.
"The secretary-general has repeatedly warned that the ongoing militarization of the conflict in Syria is leading to tragic results for the Syrian people," Ban said. "Today's incidents, where firing from Syria struck a Turkish town, again demonstrated how Syria's conflict is threatening not only the security of the Syrian people but increasingly causing harm to its neighbors."
Musa Ozer, who lives next to the house where the artillery shell landed, was crying as he spoke on the phone with CNN in the aftermath of the attack.
"The bomb fell on us. My head's really not in the right place right now," he said. "My uncle was injured and his wife died. What am I to make of this?"
Ayhan said the shell landed on one house but debris from the impact scattered across a wider area, leading to the high number of injuries.
He also voiced the concern felt by residents of the southeastern town. "The people of Akcakale are rising up against this. They live in fear," he told CNN Turk. The mayor said the shell that caused the deaths was the second to land Wednesday on Akcakale.
Salih Aydogdu, a local neighborhood mayor, called for authorities to act to prevent such incidents.
"Over the last month, we've had these types of incident five or six times. This is a small place; every time it happens, we can hear it. We are right on the border with Syria," he said. "The people of Akcakale are upset. We want the governor and the police to take precautions. This was Turkey's most peaceful and tranquil area. Now we have neither peace nor tranquility."
For the past two weeks, schools have been closed in the town, and the teachers have left, he added.
Akcakale has been rocked by previous fighting just across the border in Syria.
Last month, Turkish residents watched as Syrian shells crashed into Syrian territory, barely a stone's throw away from the Turkish border fence.
The close artillery barrage forced Turkish authorities to temporarily shut schools in Akcakale and close off roads leading to the Syrian border.
Only two years ago, Syria and Turkey enjoyed cozy bilateral relations. The neighbors had instituted visa-free travel for their citizens, and cross-border trade was booming.
Diplomatic relations ruptured, however, months after the Syrian uprising began. Last March, Turkey shuttered its embassy in Damascus and the Syrian government declared Turkey's ambassador, Omer Onhon, persona non grata.
Erdogan has repeatedly denounced Syrian President al-Assad, publicly calling on him to step down after accusing him of massacring his own people. The Syrian government, meanwhile, has accused Turkey of arming and funding Syrian rebels.
CNN journalists have witnessed light weapons in the form of assault rifles, rocket-propelled grenades and machine guns coming from Turkey to Syrian rebels.
In addition, Turkey is currently hosting more than 93,000 Syrian refugees in camps. Turkish officials estimate another 40,000 to 50,000 unofficial refugees live in Turkey outside refugee camps.
This is not the first deadly cross-border incident between the two neighbors.
On Tuesday, Turkish officials announced at least two suspected Kurdish fighters were killed after a clash broke out along the border in Turkey's Mardin province.
In June, the Syrian government announced it had shot down a Turkish military reconnaissance jet after it crossed into Syrian airspace.
Two Turkish pilots were killed in the incident. The Turkish government continues to insist the jet was shot down by a surface-to-air missile after it left Syrian airspace -- claims that the Syrian government denies.
CNN's Gul Tuysuz, Talia Kayali, Richard Roth, Joe Vaccarello, Chris Lawrence, Nick Paton Walsh, Amir Ahmed and Saskya Vandoorne contributed to this report.