QAMISHLI, Syria (Reuters) - More than 21 pro-government militiamen have been killed in two days of battles with Syrian Kurdish forces in northeast Syria that has widened the Kurds’ control over a city at the border with Turkey, a Syrian Kurdish official said.

Slideshow ( 6 images )

Five members of the Kurdish internal security force, the Asayish, were also killed in the fighting in Qamishli which the official said was the second most violent between the government and Kurdish forces since the Syria conflict began in 2011.

A Reuters witness saw at least 40 members of the pro-government militia surrendering to the Kurdish forces in the city after a battle for a prison where they were holed up on Thursday. Heavy gunfire could be heard in the city.

“More than 21 dead from regime forces of Qamishli as a result of clashes and regime attacks, with five Asayish fighters martyrs,” the official wrote in a message to Reuters.

Syrian army officials could not be reached for comment.

Qamishli is mostly controlled by Kurdish security forces that took control as the crisis spiraled in 2011. Syrian Kurdish groups now control wide areas of northern Syria where they have set up their own government.

The main Kurdish groups and their allies aim to finalize plans within six months for an autonomous political federation in northern Syria, pressing ahead despite the objections of foreign governments which fear Syria’s disintegration.

Kurdish and government forces have mostly avoided confrontation since the start of the Syrian uprising in 2011. Syria’s opposition accuses Kurdish groups that control the northeast of cooperating with President Bashar al-Assad.

They deny this.

The Kurdish official, who spoke on condition of anonymity because he was not an official Asayish spokesman, said Kurdish forces had seized three positions from government forces in the course of the fighting, including the prison.

The Syrian Observatory for Human Rights, a British-based group tracking the war, said the fighting began after the Asayish stopped a car carrying an officer of a militia that operates under the control of the Syrian army. It also reported an explosion that was likely to have been from a car bomb.

The Kurdish official said the violence was triggered by Syrian government arrests and attacks on civilians.

The Syrian government still controls a few areas in the city center, and its airport.