On Monday, the U.S. military said it killed 49 members of al-Shabaab in three separate airstrike over a period of 12 days.
The U.S. special operations forces were fighting alongside about 800 troops from the Somali National Security Forces and Kenyan Defence Forces when they were targeted around 2.45pm local time.
Friday's attack also follows the October 4 ambush in Niger that killed four US soldiers, their interpreter, and four Nigerien troops.
The statement does not identify the attackers but says a larger force of Somalian and Kenyan troops were in an operation against al-Shabab.
Defense Department officials said at first that Somali government troops had led that operation, and al-Shabab militants had attacked USA forces that were hanging back.
The coalition force was conducting a "multi-day operation" to clear al-Shabaab, an Islamist militant group, from nearby villages.
Last year, a member of the Navy SEALs was killed in a nighttime attack in Somalia, marking the first U.S. military combat death there since the infamous events of "Black Hawk Down" in 1993, when 18 American servicemen died in what is called the Battle of Mogadishu.
"My thoughts and prayers are with the families of our serviceman who was killed and his fellow servicemen who were wounded in Somolia [sic]".
US President Donald Trump offered his condolences via Twitter.
Pruitt's top attorney, Sarah Greenwalt, leaving EPA for Oklahoma state board
On Thursday, The Washington Post reported on another use of government resources to procure a luxury hotel item for Pruitt. Democrats continue to call for Pruitt to resign amid the growing list of controversies.
Giuliani: Mueller's Team Is Trying to Frame President Trump
The move by prosecutors is another sign that part of the Mueller investigation may be wrapping up. Bill Jeffress, his primary trial lawyer, said he learned about the pardon from media reports.
Cavaliers lead Warriors by 3 in Game 3 of NBA Finals
JaVale McGee scored on a series of lay-ups, Curry started to find his shot and Durant kept pouring in bucket after bucket. Cleveland is expected to put Rodney Hood back into the rotation despite his postseason 15 percent shooting from downtown.
The extent to which USA 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 US forces are helping fight extremist groups by backing proxy forces.
A US Africa Command statement said the four were in the care of the US embassy in Kenya, awaiting transport "for additional medical evaluation".
The American forces were operating alongside Somali troops. It was pushed out of Mogadishu in recent years but continues to control rural areas in the south and central regions.
The U.S. had pulled out of the Horn of Africa nation after 1993, when two helicopters were shot down in Mogadishu and bodies of Americans were dragged through the streets.
Names of the soldiers have not been released while the US notifies next of kin.
The U.S. team was backed up by armed surveillance aircraft, the officials said.
It was also a 3rd Special Forces Group team which was hit in Niger past year, an ambush which killed four American soldiers and led to a massive investigation by the Pentagon.
A Pentagon investigation into the Niger attack, parts of which were made public last month, found multiple failures but none that directly caused the ambush by Islamic State group-linked fighters.