MOGADISHU (Reuters) - Somalia’s Islamist group al Shabaab has claimed responsibility for an attack in which a U.S. commando was killed and four others were wounded when they came under fire in the country.

The U.S. special operations forces were fighting alongside about 800 troops from the Somali National Security Forces and Kenyan Defence Forces when they were attacked late on Friday by mortars and small arms fire.

“We attacked a military base ... killed one U.S. soldier, two Kenyan soldiers and nine Somali soldiers from Jubbaland state. We also injured four U.S. soldiers,” Abdiasis Abu Musab, al Shabaab’s military operations spokesman, told Reuters on late Friday.

He said the attack was in the southern town of Kismayo.

In a statement, the U.S. military said on Friday one local soldier was also wounded in the attack that also involved Somali and Kenyan forces.

The troops had been on a mission to clear al Shabaab from contested areas as well as villages the militants controlled, “and establish a permanent combat outpost” to expand the reach of the Somali state, according to the U.S. statement.

Kenyan military spokesman David Obonyo told Reuters that its forces were not involved in any operations in Somalia on Friday

About 500 U.S. troops are deployed in Somalia.

Al Shabaab is fighting to overthrow Somalia’s central government and establish its own rule based on its interpretation of Islamic law.

Since being pushed out of Mogadishu in 2011, the group has lost control of most of Somalia’s cities and towns, but it retains a strong presence in regions outside the capital.