Kenya's military says it has killed 19 fighters from the Somali extremist group al-Shabab who were attempting to ambush Somali national troops.

Military spokesman Col. David Obonyo said Wednesday Kenyan troops on patrol Tuesday night, in the southern city of Afmadow, found a group of militants suspected to have been preparing to attack a Somali National Army camp.

Al-Shabab, which is allied to al-Qaida, is waging an insurgency against Somalia's United Nations-backed government, carrying out deadly attacks on military and civilian targets in and out of Somalia. Kenya is among six countries contributing troops under the banner of the African Union Mission in Somalia that are bolstering Somalia's weak government.

Al-Shabab killed up to 200 Kenyan soldiers in a January attack, according to Somali President Hassan Sheikh Mohamud.