The last time an American soldier in Somalia was killed was 13 months ago, when a member of the Navy SEALs was killed in an attack by al Shabaab on us and Somali forces.
A local service member also died, defense officials said.
The joint-coalition forces had been conducting an operation against al-Shabab militants about 217 miles southwest of the capital, Mogadishu, when the attack occurred, the statement said.
It's the first public announcement of a USA military combat death on the continent since four US service members were killed in a militant ambush in the west African nation of Niger in October.
The operation is aimed to clear the Somalia-based extremist group al-Shabab from contested areas. The attack marks the first known combat death of a United States service member in Africa since the October 4 ambush of U.S. and Nigerien forces which claimed the lives of four American troops and five Nigeriens.
Militants affiliated with al-Shabab have threatened to conduct attacks against the United States, and the USA military has said the group poses a direct threat to US interests and allies in the region.
The most recent USA casualty in Somalia occurred previous year, when a member of the Navy SEALs was killed in a nighttime attack in Somalia.More news: How the US-North Korea summit will move the markets
President Donald Trump shared his condolences in a Twitter message Friday evening.
Three of the four USA service members were transferred for medical treatment while the fourth received medical care on the spot, the Washington Post reported. Al-Shabab has been blamed for the October truck bombing in Mogadishu that killed more than 500 people. Al-Shabaab is an al-Qaeda affiliate operating to overthrow the Somalian government, and it took credit for the attack.
The US have been providing advice, assistance and aerial surveillance during the mission.
The names of the soldiers have not been released while the USA notifies next of kin.
The US's role in AFRICOM's area of responsibility has come under heavy scrutiny following an October ambush in Niger that left four soldiers dead.
The group used to control most parts of the country, but since 2010, its fighters have been removed from most major towns and cities.