The fourth wounded US service member was treated in country, the Pentagon said.
The combined force "came under mortar and small-arms fire at approximately 2:45 p.m. Mogadishu time, killing one U.S. service member and injuring four other U.S. service members and one partner force member", a statement from the U.S. Africa Command said. The incident occurred on Friday afternoon local-time.
"We attacked a military base killed one USA soldier, two Kenyan soldiers and nine Somali soldiers from Jubbaland state".
The Pentagon has carefully monitored the spread of radical Islamic jihad across Africa but insisted that American troops are there to train and partner with local forces, not necessarily to fight.
This is the first American death while in combat on the African continent since October. The U.S. provided advice, assistance and aerial surveillance during the mission, the statement said. Three of the wounded USA service members and the one local fighter who was wounded in the attack were medically evacuated, the Pentagon said. The fourth received sufficient medical care on the scene.
Friday's joint operation, part of a multi-day mission including about 800 Somali and Kenyan troops, aimed to clear al-Shabab from contested areas. The last killing of a US service member in Somalia was in May 2017 during an operation about 40 miles (64 kilometers) west of Mogadishu. They were awaiting transport "for additional medical evaluation".
The extent to which US troops are assisting behind the scenes or fighting shoulder-to-shoulder with local troops has become a point of contention, not only in Somalia but also in other parts of the world where USA forces are helping fight extremist groups by backing proxy forces.
"Our thoughts and prayers are with the families and friends of the service members".
Miliken's was the first USA combat death in Somalia since 1993, when 18 US service members died battling Somali militiamen in an episode that became known as "Black Hawk Down". There are an estimated 7,300 American troops around the globe conducting these special operations.
The US Special Forces team were from the 3rd Special Forces Group, whose area of responsibility is in Africa, were constructing a new forward operating base. Some of al-Shabaab's top leaders have been killed in US drone strikes, but its operations have continued in Somalia despite the resistance.
Trump approved expanded military operations against al-Shabab in early 2017, leading to an increase in USA military personnel to more than 500 and the launch of dozens of drone strikes. "The missions we actually accompany on have to have some type of strategic value in terms of the enemy we're going against".
Al-Shabab claimed credit for the attack, the SITE Intelligence Group said in a statement Friday.