DIYARBAKIR, TURKEY/BEIRUT (Reuters) - Syrian Kurds battled on Saturday with forces loyal to President Bashar al-Assad, Kurdish sources and a monitoring group said, breaking a longstanding tacit agreement between the two sides to focus on other enemies in a complex civil war.

In Syria's predominantly Kurdish northeast, Assad's forces and Kurdish militia, mainly the Syrian Kurdish People's Protection Units (YPG), have for the most part coexisted without clashing, focusing their firepower on the Islamic State insurgent group.

However, violence broke out when army soldiers and allied militiamen took control of buildings in an area that both sides had agreed would stay demilitarised, the Syrian Observatory for Human Rights monitoring group said.

"There has been some serious fighting today. The PYD (the political wing of the YPG) arrested 10 soldiers and Baath party gunmen," Observatory head Rami Abdulrahman told Reuters.

"There is now fighting in many areas of Hassakeh."

The YPG and the government had divided Hassakeh into zones in a power sharing agreement, the Observatory said.

The army shelled three Kurdish-majority areas on the edges of Hassakeh city, and fighters from YPG clashed with Syrian forces inside the city throughout the day, the YPG said on its website.

Syrian Kurds, who say they suffered years of marginalisation under Assad, had on occasion fought with the president's loyalists in territorial disputes, but never in sustained clashes.

Kurdish activists posted photos showing smoking rising from buildings and YPG fighters raising the Syrian Kurdistan flag in areas said to be taken from government forces.

Syrian officials were not immediately available for comment and state media did not mention the clashes. A spokesman for the YPG was not available.

Damascus has promoted its ties with the Kurds, saying that it provides military support to Kurdish forces to help them battle Islamic State, although the PYD denies that it cooperates with the central government.

During the three-year war in Syria, Kurds have asserted control in parts of the northeast where their community predominates. Islamic State and other hardline groups consider Kurds heretics and have fought to take areas they control.

There were smaller scale clashes in May between Assad loyalists and Kurds in Hassakeh that were contained.

Around 200,000 people have been killed since the Syrian conflict began in March 2011, according to the United Nations.

(Reporting by Seyhmus Cakan in Diyarbakir, Turkey and Oliver Holmes and Reuters TV in Beirut; Editing by Raissa Kasolowsky)