The attack marks the first known combat death of a United States service member in Africa since the October 4 ambush of USA and Nigerien forces which claimed the lives of four American troops and five Nigeriens. The incident occurred on Friday afternoon local-time.
The name of the fallen service member is being withheld pending next of kin notification, according to AFRICOM.
The forces were also setting up "a permanent combat outpost" to help expand the Somali government's control over the region, where the jihadist insurgency for years has destabilized the east African nation, particularly in rural areas. In addition, the USA had armed surveillance aircraft overhead.
Trump signs bill to expand private care at troubled VA
He said for veterans who have been standing "in line for weeks and weeks" seeking care at VA, "now they can go see a doctor". The government will have to pay interest if its bill is not paid in an allotted time period, the congressman said.
One US service member received medical treatment in the field while the three other wounded service members were evacuated, the statement said.
About 500 US troops are deployed in Somalia. They were awaiting transport "for additional medical evaluation".
Another U.S. service member in Somalia was killed in May 2017 during an operation about 40 miles west of Mogadishu.
Traditionally, US presidents have been wary of intervening in Somalia since 18 special forces soldiers died fighting militias in Mogadishu in 1993, a battle dramatised in the film Black Hawk Down. There are an estimated 7,300 American troops around the globe conducting these special operations. Earlier Friday, the U.S. Africa Command issued a statement in response to allegations that civilians had been killed in a May 9 operation, saying a "thorough review" found the allegations to be "not credible". Some of al-Shabaab's top leaders have been killed in USA drone strikes, but its operations have continued in Somalia despite the resistance.
In September 2014, American officials said they believed a drone strike crippled the group by killing its leader, Ahmed Abdi Godane, who at the time was one of the most wanted men in Africa. "The missions we actually accompany on have to have some type of strategic value in terms of the enemy we're going against".