A US Africa Command statement said the four were in the care of the US embassy in Kenya, awaiting transport “for additional medical evaluation”. Names of the soldiers were not immediately released, while next of kin were notified.
It was the first public announcement of a US military combat death in Africa since four US service members were killed in a militant ambush in the West African nation of Niger in October.
That death was followed by an ugly confrontation between President Donald Trump, members of his staff and the widow of one of the soldiers killed. A Pentagon investigation of the incident produced a highly critical report.
Friday’s attack in Jubaland is likely to put renewed scrutiny on US counter-terror operations in Africa. US troops with Somali and Kenyan forces came under mortar and small-arms fire and one “partner force member” also was wounded in the attack about 217 miles south-west of Mogadishu, the US military said.
The al-Qaida-linked al-Shabaab rural south and central regions, claimed responsibility.
The group was blamed for a truck bombing in Mogadishu in October that killed more than 500 people and raised concerns about its ability to build larger explosives.
Friday’s joint operation, part of a multi-day mission including about 800 Somali and Kenyan troops, aimed to clear al-Shabaab from contested areas. The US said its personnel provided advice, assistance and aerial surveillance.
In early 2017, Trump approved expanded military operations against al-Shabaab, leading to an increase in US military personnel to more than 500 and the launch of dozens of drone strikes. The US had pulled out of the country after 1993, when two helicopters were shot down in Mogadishu and bodies of Americans were dragged through the streets.
A US service member was killed in May 2017, in an operation about 40 miles west of Mogadishu.
Trump, who was attending the G7 summit in Canada, tweeted about the latest death on Friday. He wrote: “My thoughts and prayers are with the families of our serviceman who was killed and his fellow servicemen who were wounded in Somalia. They are truly all HEROES.”