Washington (AFP) - An American commando was killed Friday in an attack in southern Somalia that also wounded four US military personnel along with a Somali soldier, officials said.

The attack occurred in Jubaland, where a large force comprising about 800 Somali, Kenyan and US troops were working to clear a large area of Al-Qaeda-aligned Al-Shabaab fighters.

The multinational force "came under mortar and small-arms fire at approximately 2:45 pm Mogadishu time (1145 GMT), killing one US service member and injuring four US service members and one partner force member," the US military's Africa Command said in a statement.

A military official told AFP the dead American was a special operations commando, but further details were not being released pending notification of next of kin.

US President Donald Trump offered his condolences via Twitter.

"My thoughts and prayers are with the families of our serviceman who was killed and his fellow servicemen who were wounded in Somolia. They are truly all HEROES," Trump tweeted, misspelling the name of the country in which the attack took place.

The mission's objectives were to "clear Shabaab from contested areas, liberate villages from Shabaab control and establish a permanent combat outpost designed to increase the span of federal government of Somalia security and governance," Africa Command said.

"The US provided advice, assistance and aerial surveillance during the mission."

More than 500 American forces are partnering with African Union Mission to Somalia (AMISOM) and Somali national security forces in counterterrorism operations, and have conducted frequent raids and drone strikes on Al-Shabaab training camps throughout Somalia.

Last year, a Navy SEAL was killed in a nighttime attack in Somalia, marking the first US military combat death there since the infamous "Black Hawk Down" events of 1993, when 18 American servicemen died in the Battle of Mogadishu.

Since 2007, Al-Shabaab has been fighting to overthrow the internationally backed government in Somalia.