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.
Simona Halep hits back to sink Angelique Kerber in quarter-finals
Stephens has made the second week in Paris in five of her seven appearances and Keys is slowly coming to terms with the surface. Off the baseline, Stephens will bait Keys to go for too much, using her speed and counter-punching ability to shrink the court.
Former Ark City PD chief living in Guatemala safe after volcanic eruption
Though numerous clouds obscure a view of the volcano, the footage shows a dark ash cloud suddenly grow in the centre of the image. The disaster on Sunday was the volcano's biggest eruption in four decades.
Italy can not be 'Europe's refugee camp': new deputy PM Salvini
The opposition Democratic Party warned that the new government would be "Right-wing, populist and risky ". His first attempt to assemble an M5S-League coalition government collapsed on Sunday.
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.