MOGADISHU (Reuters) - Somali Islamist insurgents stoned a man to death on Sunday as punishment for alleged adultery, they said, a reminder that the militia is still strong enough to carry out public executions despite losing its grip on most towns and cities.

Hundreds of witnesses watched the death of 44-year-old Dayow Mohamed Hassan in Ramo Adey village in the south-central Bay region, the regional governor representing the al Qaeda-linked insurgency said.

Moalim Geedow told Reuters that Hassan was buried neck-deep in a hole then pelted with stones.

“The man was married with two wives and children. He was publicly stoned to death today for committing adultery according to the Islamic sharia,” Geedow said, using a term for Islamic law.

“The man had a third woman who was a divorcee. He did not have her according to sharia. He deceived her, saying that he went to a sheikh (local leader) and that he married her. However, when the woman got pregnant, the two families debated and there was no trace of valid matrimony. The court ruled he did not marry her legally and he was stoned to death.”

The government did not return calls seeking comment.

Al Shabaab is fighting to overthrow the weak U.N.-backed government and impose its own strict interpretation of Islamic law. It was a radical offshoot of the Islamic Courts Union, an alliance of Islamic courts that ruled the capital of Mogadishu and much of the south in 2006.

In recent years al Shabaab has lost control of most towns and cities to a 22,000-strong African Union peacekeeping force supporting the government. But it retains a presence in the countryside and many villages.