This was a death foretold. A Toyota pickup with a loudspeaker began an early-morning tour of the ruined neighbourhoods of Kismayo, a port in southern Somalia, announcing that there would be a killing. By 4pm a crowd of 1,000 people had gathered at the football stadium. A hole had been dug in the ground, and half an hour later a truck loaded with rocks arrived.

A group of fighters from the Al-Shabab militia who control the city appeared, firing warning shots into the air to disperse a crush of people trying to reach the stones.

A young girl was dragged into the stadium. She knew what was going to happen next, and witnesses saw her struggling and screaming.

Download the new Independent Premium app Sharing the full story, not just the headlines

"What do you want from me?" she asked. Then she shouted "I'm not going, I'm not going. Don't kill me."

But four men forced her into the hole and buried her up to her neck. Fifty men then set about stoning her to death. After 10 minutes she was dug up and two nurses checked to see if she was alive. She was. So they put her back in the ground and the stoning recommenced.

Aisha Ibrahim Duhulow's crime was to be raped and then report it. After being attacked by three men her family went to the Al-Shabab Islamist militia to report the crime. She was detained and accused of adultery. No effort was made to identify or arrest the rapists.

Despite reports that she was 23 years old, Aisha was actually 13. "She hadn't even reached the age to be married," her distraught father said.

People in Kismayo say they live in constant fear of the Al-Shabab, but not everyone was content to watch a "clearly distressed" girl being stoned to death. Some people tried to intervene. The gunmen fired shots; one man was wounded and an eight-year-old boy was shot dead. The militia later apologised for his killing.

After the execution a man called Sheik Hayakalah told a radio station: "The evidence came from her side and she officially confirmed her guilt," he said. "She told us that she was happy with the punishment under Islamic law." Aisha's father said his daughter had begged for her life. It is illegal under Sharia to convict a 13-year-old of adultery.

Somalia is nightmarish. During the Cold War its strategic location on the Horn of Africa saw it become possibly the world's largest arms dump. With no effective government for nearly two decades, it has become a theatre for the proxy wars of its neighbours and a domain ruled by warlords and extremists. The emergence of the Islamic Courts movement, which drove the warlords out of Mogadishu, briefly offered hope of relative stability. Instead the movement was portrayed as a hotbed of Islamist extremism, accused of links to al-Qa'ida, and neighbouring Ethiopia was encouraged by the US to invade.

Today the country is divided between warlords, an illegitimate government protected by occupying troops, resurgent Islamist militias and a small, besieged force of Ugandan peacekeepers. Three million people out of a population of nine million are at immediate risk of starvation.

Incidents such as the stoning are presented by some as evidence of the need to confront Islamist forces in the country. However, analysts point out that the "military solution" has been a crushing failure that has driven out moderates and made a bad situation dramatically worse.