BEIRUT (Reuters) - Kurdish security forces will keep territory taken from pro-government forces during a rare three-day outbreak of violence in a city in northeastern Syria, a truce announced by Kurdish authorities on Sunday indicated.

Slideshow ( 3 images )

The fighting in Qamishli, near the Turkish border, disturbed a largely peaceful coexistence there between the Kurds’ Asayish internal security forces that control most of the city and pro-government forces holding the airport and part of its centre.

During the fighting that broke out last Wednesday and was halted late Friday afternoon, Asayish forces seized the main prison and several government-controlled positions in the city.

The truce, which seemed to be holding on Sunday, headed off possibly wider fighting between the pro-government forces and the Kurds, whose YPG militia is an important ally in the U.S.-led campaign against Islamic State on other fronts in Syria.

A copy of the truce agreement seen by the Syrian Observatory for Human Rights said “each side will keep the territory under its control”. Kurdish authorities and media said this meant territory taken from government control would not be returned.

The agreement said that employees of the Syrian state must not be threatened, deprived of their salaries or recruited into joining “local protection units that belong to the regime”.

Damascus maintains a strong administrative presence and still pays government employee salaries in Qamishli, one of the largest cities in Hasaka province in Syria’s far northeast corner adjoining Turkey and Iraq.

Both sides also agreed to free prisoners taken during the clashes, the agreement said.

Syrian Kurdish regional interior minister Canaan Barakat, speaking in Qamishli on Sunday to announce the terms of the truce, said 17 civilians, 7 Asayish members and 3 YPG members had been killed in the clashes.

The Britain-based Observatory, which tracks the five-year-old war in Syria, said 22 members of Syrian government forces died and 80 were taken prisoner. It said 23 civilians died during government shelling of Kurdish-controlled areas.

The agreement said the structure of pro-government forces stationed in Qamishli would be reviewed and Damascus would no longer interfere in local society, but provided no further information elaborating on these measures.

Compensation would be paid to civilians who lost relatives or suffered material damage in government shelling, it added.

The truce also stipulated the state of emergency in the city should be lifted. The Observatory said life is slowly returning to normal but the main market remained closed.

Syrian Kurdish forces now dominate wide areas of northern Syria and have set up their own government there. Syria has become a patchwork of areas controlled by the government, an array of rebel groups, Islamic State militants, and Kurdish militia.

Mediators have struggled to get Syria’s combatants to honour a broader Feb. 27 deal to cease hostilities to enable peace talks to proceed. On Friday, the U.N. special envoy for Syria vowed to take the talks into next week despite a walkout by the main armed opposition and preparations on both sides to escalate the war.