At least 24 civilians have been killed and 22 others injured in the southern Somali town of Marka after troops from the African Union opened fire on unarmed residents, local residents and a health worker told Al Jazeera.

The soldiers driving armoured vehicles went to a sports grounds then opened fire on boys playing football killing nine and wounding eight, Haji Muse Mohamud, an elder in the town, told Al Jazeera by phone on Tuesday from the coastal town in Somalia's Lower Shabelle region.

"They then went to the nearby houses where they dragged people out and shot dead 17 people. They also left 14 people badly injured," Mohamud said.

Mohamud also alleged that the soldiers, who are part of the African Union Mission in Somalia (AMISOM), "raped two women".

AMISOM refutes allegations

Most of the injured were taken to the capital, Mogadishu, about 109km away from the town.

"It was a massacre of innocent people. We took the injured on wheelbarrows to the hospital, but we had to send many to Mogadishu because we could not treat them," Mohamed Ali, a health worker in the town, told Al Jazeera.

"These people did nothing to deserve this. If they [AU troops] want to fight al-Shabab they know where they are, they should go fight them, not the innocent people," Ali said.

RELATED: AU troops accused of raping Somali women

In a statement published on its website, AMISOM said it strongly "refutes" the allegation it killed civilians, instead claiming that it had engaged fighters from al-Shabab in a gun battle.

"In the ensuing gun battle to dislodge the terrorists, as AMISOM is mandated to do, five al-Shabab fighters were killed including one of their notorious leaders, Mohammed Dahir," the statement said.

"It is instructive to also mention the fact that two riffles [sic], an Improvised Explosive Device [IED], an instruction board and the al-Shabab flag were also recovered from the scene."

Rights abuse

Many residents have fled the part of the town where the deadly incident took place, locals said.

This is not the first time the troops have been involved with incidents like this. Last year they were accused by residents and officials of firing on protesters in the town injuring at least six people and damaging dozens of properties.

Last year, Human Rights Watch, the US-based rights group, said the AU troops gang-raped Somali women and girls as young as 12 and traded food aid for sex.

Currently 22,000 troops from Burundi, Uganda, Kenya, Ethiopia, and Djibouti are in the horn of Africa country to battle the al-Qaeda-linked armed group, al-Shabab which calls for a strict version of Sharia law.

The rebel group often carries out deadly attacks in southern and central Somalia.

Last month more than 50 soldiers from Burundi who are part of the AMISOM were killed in the small town of Lego in Lower Shabelle region when hundreds of fighters from al-Shabab attacked their base at dawn.

Follow Hamza Mohamed on Twitter: @Hamza_Africa