African Union Soldiers
[Representational Image]Reuters File

Somali soldiers killed five women they believed were the wives of Al-Shabaab militants in a revenge attack after the Islamists had beheaded a soldier's wife earlier this week.

The Al-Shabaab militants had kidnapped two women, one of whom was a soldier's wife, and had beheaded both a few days ago in Tiyeglow district, AFP reported.

In retaliation, the soldier who lost his wife, along with his colleagues, rounded up about 10 women they said were wives of the militants and killed five of them before the rest were rescued.

"It was horrible, Al-Shebab killed two innocent women connected with the government troops. For the death of the two women, they arrested 10 women whom they said were wives of Al-Shebab militants, killing five before the elders rescued and freed the rest," Aliyow Isack, a local, told AFP.

Locals called both acts "barbaric."

"It was a completely barbaric act against humans. They were innocent women, some of those killed might have been married by force to the gunmen," said another local, Mohamed Malim. 

The Al-Shabaab militants have wreaked violence in Somalia and across the border in Kenya in recent weeks.