A Kenyan military official says Kenyan troops in Somalia killed 21 suspected al-Shabab extremists who were plotting an ambush in southern Somalia.

Military spokesman Col. David Obonyo said Wednesday a lone gunman shot at the Kenyan troops Tuesday and fled while the troops were on the way to Tabda. Obonyo said the troops searched the area and found rebels planning an ambush.

Kenya troops are among the African Union troops bolstering Somalia's weak U.N.-backed government against an insurgency by al-Shabab rebels which are linked to al Qaida. Al-Shabab espouses the Saudi Arabian Wahabi version of Islam, which follows strict Shariah law and has carried out amputations and executions, including stoning to death. Despite losing control of Somalia's major cities, al-Shabab frequently carries out violent attacks in Somalia and neighboring countries.