The U.N. Security Council Thursday evening condemned a Syrian mortar attack on a Turkish border town that killed five people and demanded that "such violations of international law stop immediately and are not repeated."

The rare agreement on a Syria statement condemned the attack "in the strongest terms" and came after Russia rejected an initial text on Wednesday's incident and proposed a diluted version calling on both Turkey and Syria to exercise restraint, Reuters reported.

Western council members objected to Moscow's text but revised the original draft to accommodate some Russian concerns.

The statement said the attack underscored the grave impact the Syrian crisis was having on "regional peace and stability," the BBC reported. An earlier draft referring to "international peace and security" -- which might have hinted at international action -- was blocked by Russia.

Consensus within the council on anything related to Syria is unusual and it has been deadlocked on the  conflict for more than a year, with Russia and China rejecting calls to sanction the Damascus government.

The text of the final statement from the 15-member Security Council "called on the Syrian government to fully respect the sovereignty and territorial integrity of its neighbors" and "demanded that such violations of international law stop immediately and are not repeated."

"The members of the Security Council underscored that this incident highlighted the grave impact the crisis in Syria has on the security of its neighbors and on regional peace and stability," it said.

Syria's U.N. envoy, Bashar Jaafari, said his government was not seeking escalation with Turkey, the BBC said.

He criticized 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 council would address that issue Friday.

On Thursday, Turkey's parliament authorized 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.

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 the ruling Justice and Development Party of being a stooge of the U.S.

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.