It is the first U.S. military combat death in Somalia since 1993.
U.S. forces were conducting an advise-and-assist mission about 40 miles west of Mogadishu, Somalia's capital, with members of the Somali National Army when the group came under attack in the middle of the night.
U.S. and Somali forces were attacked at some point after arriving by helicopter to the target location, a compound that housed a group of al-Shabaab militants associated with an attack on facilities nearby used by Somali and U.S. military forces.
“We helped bring them in there with our aircraft,” Pentagon spokesman Capt. Jeff Davis told reporters today. “We were there maintaining a distance back as they conducted the operation, that’s when our forces came under fire and we had the unfortunate casualty.”
U.S. and Somali forces were ultimately able to return fire and suppress the attack, a U.S. official told ABC News.
No Somali forces were hurt but a Somali interpreter and two U.S. service members were injured.
The United States has about 50 military personnel in the country, Davis said.
The mission was not being carried out under the new expanded authorities granted by the Trump administration for the U.S. military to conduct offensive counterterrorism airstrikes in Somalia targeting al-Shabaab, according to the U.S. official.
"U.S. forces are assisting partner forces to counter al-Shabaab in Somalia to degrade the al-Qaeda affiliate's ability to recruit, train and plot external terror attacks throughout the region and in America," the statement added.
Ultimately, al-Shabaab decided not to affiliate itself with ISIS, although a small faction did break away and pledge its allegiance.