The UN Security Council has condemned a Syrian mortar attack on a Turkish border town that killed five civilians.
The statement said the attack underscored the grave impact the Syrian crisis was having on "regional peace and stability".
An earlier draft referring to "international peace and security" was blocked by Syria's ally Russia.
Turkey's parliament has authorised military action inside Syria, a move that triggered anti-war protests.
However, Turkish Prime Minister Recep Tayyip Erdogan has said his country does not intend to start a war with Syria.
On Wednesday and Thursday, Turkey shelled targets inside Syria, but early on Friday the area was said to be calm.
Inside Syria, the Local Coordination Committees activist network reported fierce clashes in Aleppo, and government shelling in cities including Damascus, Hama, Homs and Idlib.
Activists from the London-based Syrian Observatory for Human Rights said air attacks on Homs were the worst the city had seen for five months.
The BBC's Barbara Plett at the UN says Thursday's statement was strongly worded but was still the result of a compromise with Russia, which along with China has blocked previous resolutions condemning Damascus.
Russia had tried but failed to include language apparently aimed at balancing the Syrian attack with Turkey's military response, she says.
But Russia did succeed in blocking a draft version that called the mortar attack "a threat to international peace and security", a phrase our correspondent says could be used to justify greater Security Council involvement.
The final version said the incident "highlighted the grave impact the crisis in Syria has on the security of its neighbours and on regional peace and stability".
It demanded that "such violations of international law stop immediately and are not repeated".
It called on the Syrian government to "fully respect the sovereignty and territorial integrity of its neighbours" and urged "restraint".
Syria's UN envoy Bashar Jaafari said his government was not seeking escalation with Turkey.
He criticised the Security Council's silence on "suicide terrorist attacks that struck the city of Aleppo" that killed dozens of Syrians on the same day as the Turkish incident.
A senior diplomat said the Security Council would address that issue on Friday.
'No to war!'
On Thursday, Turkey's parliament authorised troops to launch cross-border operations against Syria for a period of one year.
The emergency vote followed the shelling of the Turkish town of Akcakale in which two women and three children were killed.
Mr Erdogan said at a news conference in Akcakale on Thursday evening: "We want peace and security and nothing else. We could never be interested in something like starting a war."
But he added: "The Turkish Republic is a state capable of defending its citizens and borders. Nobody should try and test our determination on this subject."
On Thursday evening thousands of people held an anti-war rally in Istanbul's Taksim Square.
Demonstrators chanted: "No to war! Peace now! We won't be soldiers of imperialists!"
Some banners accused Mr Erdogan's Justice and Development Party (AKP) of being a stooge of the US.
Bedri Baykam, a Turkish artist and activist, said: "[The] United States wants Turkey to enter war against Syria because there are elections coming in the United States. Obama doesn't want to send American troops so the Turkish army serves as their tool but we don't want to be part of the bloodshed in the Middle East."
Other, smaller anti-war protests were reported in Izmir, Mersin, Eskisehir and other cities and towns.
Mr Jaafari said his country had offered condolences over the deaths but not an apology because an inquiry into the incident had not been completed.
Turkey has been a critic of Syrian President Assad since anti-government protests erupted there more than a year ago.
Ankara has openly supported the armed rebellion and called for the end to the regime.
Russia has consistently blocked UN Security Council resolutions saying it does not support regime change in Syria. China - another veto-wielding UN power - has also sided with Russia.
Moscow argues that radical Islamists could take Mr Bashar's place and threaten Russia's national security.
Russia also has arms contracts with the Syrian government worth billions of dollars.