A military court in Somalia's breakaway region of Somaliland has sentenced 17 people to death for attacking a military base over a land dispute one day earlier, an official said Thursday.

Dozens of angry people marched through the streets of Hargeisa on Thursday to demand the release of the defendants. Riot police dispersed the crowd.

The court in Somaliland's capital convicted the 17 on Wednesday, saying the defendants confessed to attacking soldiers during Tuesday's confrontation. Somaliland, in Somalia's north, has not generally suffered from the civil war that has engulfed central and southern Somalia.

The attack by an angry and armed crowd in Hargeisa killed eight people, including three soldiers, said Somaliland Defense Minister Ahmed Haji Ali.

The court rejected the defense's contention that the decision was reached in haste.

"The court found these defendants guilty of being involved in the attacks on the soldiers and they confessed to it," Somaliland military court prosecutor Yusuf Farah Sharmarke said Thursday.

Five other defendants were underage and were sentenced to life in prison, he said.

According to the prosecution, the 17 have no chance to appeal their death sentences.

Somaliland, a former British colony, declared independence in 1991 when Somalia's central government in Mogadishu collapsed. The international community does not recognize Somaliland as a separate country.