"The US provided advice, assistance and aerial surveillance during the mission".
Still, the US has made several changes in the way its forces have been operating in Africa, the result of an investigation into an October 2017 ambush of USA special operations forces in Niger that left four Americans and four Nigeriens dead.
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.
A US Defense official confirmed to media that four American soldiers were injured in the attack.
A military official said the dead American was a special operations commando, but further details were not being released pending notification of next of kin.
But al-Shabab has continued to carry out deadly suicide bomb attacks in Mogadishu, while retaining a strong presence in other parts of the country.
The death of the USA soldier in Somalia was the second in the last two years.
Taliban Orders Three-Day Eid Ceasefire
The government cease-fire will begin on June 12 and last through Eid al-Fitr holiday, June 19, not including al Qaida or ISIS. The militants said foreign forces would be excluded from the ceasefire and that operations against them would continue.
About 500 US troops are deployed in Somalia.
The attack on Friday came toward the end of a dayslong operation in which a team of Green Berets from the 3rd Special Forces Group - the same unit that fought in the ambush in Niger - worked to clear several villages from Shabab control alongside 800 local troops from Somalia and Kenya.
Four other service members were wounded.
"There has been no direction at this time to adjust force size in AFRICOM [U.S. Africa Command]", said Pentagon spokeswoman Major Sheryll Klinkel.
Late past year US drone strikes also began targeting a small presence of fighters linked to the Islamic State group in Somalia's north.
A suicide vehicle bomb explosion at a military base in Somalia injured seven soldiers late Saturday, a military official said, and Islamist group al Shabaab claimed responsibility for the attack.
"Our strategy in East Africa is to build partner capacity to ensure that violent extremist organizations, who wish harm in the region, wish harm on the European continent, and ultimately wish to harm the United States, are contained", General Thomas Waldhauser, Commander, U.S. Africa Command, said in a statement Saturday.