al shabaab somalia
Three al-Qaida members were shot by firing squad for attacking the presidential palace in July. Reuters

Three al-Shabaab members accused of being involved in a terrorist attack on the presidential palace in Mogadishu have been executed by firing squad.

The men were found guilty of killing civilians and orchestrating the attack in July, and were sentenced to death by a Somali military court.

Members of the al-Qaida linked Somali terrorist group attacked the presidential palace with guns and bombs while President Hassan Sheikh Mohamud was away.

A spokesman for al-Shabaab said 14 government soldiers were killed. Nine attackers are also believed to have died in the incident.

On Sunday, at least three female city workers were killed and seven others wounded after a remotely detonated bomb exploded in the busy Hodan market district of Somalia's capital Mogadishu.

The women are believed to have been cleaning the streets when the bomb exploded.

Police officer Major Ali Afrah told Reuters: "A remotely controlled roadside bomb killed three female city cleaners and injured seven others in Hodan district. The militants hid the bomb inside a rubbish pit."

Nuria Ahmed, a mother of four who lives in the area, added: "We heard a big blast and then I could see the old mothers who were cleaning the scene lying, some of them dead and others screaming.

"The bomb was wrapped in a big, black plastic bag and then placed inside the rubbish along Taleh Street. I counted three dead and seven others injured. I was the first person who arrived to help. It is very unfortunate if mothers are the target."

African Union forces and the Somali army launched a new campaign against al-Shabaab this year.

Several towns have been taken back from the group, but it still controls large swathes of the countryside and some settlements which it uses as a base from which to wage its guerrilla warfare.

Al-Shabaab is fighting to impose a harsh version of Islamic Sharia law across Somalia. It was responsible for the deadly attack on the Westgate Shopping Mall in Kenya's capital Nairobi last September, which killed at least 67 people and injured 150 others.