The Kenyan army has engaged in a "fierce" battle with al-Shabab and killed 21 jihadists, according to Kenyan military spokesman David Obonyo.

The operation came after al-Shabab militants ambushed Kenyan soldiers Saturday and killed two of them in the southern Somali town of Afmadow, Obonyo noted.

"Following the incident, 21 al-Shabab militants were killed, and 19 AK-47 rifles, three rocket propelled grenades and a pistol were recovered," the spokesman said in a statement late Saturday.

"Regrettably, the Kenya Defence Forces suffered two fatalities and five injuries. The injured were evacuated and are receiving medical attention," Obonyo said.

Last week, the Islamist group launched a similar attack in Afmadow, which was eventually thwarted by the military.

In a separate incident on Sunday, the Kenyan forces killed 13 al-Shabab fighters in Sarira. The military claims to have captured a "mid-level al-Shabab commander" in the raid.

Al-Shabab controlled vast swathes of territory in Somalia until 2011, before it was driven out of Mogadishu by African Union and Somali troops. The jihadists, who want to impose Sharia law in the Horn of Africa region, launch sporadic attacks on security forces and target the civilian population, as well.

In January, al-Shabab and al-Qaeda linked up and overran a Kenyan military camp in El Adde, killing dozens of soldiers.

shs/gsw (AFP, Reuters)