southern Jubaland province, where a small joint US-Somali outpost came under small arms and mortar fire, US defense officials said.
The U.S. soldiers were conducting a multi-day operation alongside 800 forces from the Somali National Security Forces and the Kenyan Defense Forces to liberate areas under the control of jihadists from the al-Shabaab group.
Four american military officials wounded during an Al-Shabaab attack in Somalia, are treated for their injuries and discharged.
The troops had been on a mission to clear al Shabaab from contested areas as well as villages the militants controlled, "and establish a permanent combat outpost" to expand the reach of the Somali state, according to the usa statement.
The U.S. Africa Command reported killing 27 al-Shabaab terrorists Saturday, and in 2014 the U.S. said it killed the group's leader Ahmed Abdi Godane in a drone strike.
The operation is aimed to clear the Somalia-based extremist group al-Shabab from contested areas. He was the first USA casualty in Somalia since the Black Hawk Down incident in 1993.
US President Donald Trump offered his condolences via Twitter.
Three of the four wounded USA service members were evacuated to receive additional medical treatment, the military said.
Around 500 American forces are stationed throughout Somalia including a number of Special Operations units comprised Army Green Berets, Marine Raiders and Navy SEALS.
Miliken's was the first US combat death in Somalia since 1993, when 18 USA service members died battling Somali militiamen in an episode that became known as "Black Hawk Down".
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.
The names of the soldiers have not been released while the USA notifies next of kin.
It was also a 3rd Special Forces Group team which was hit in Niger previous year, an ambush which killed four American soldiers and led to a massive investigation by the Pentagon.
A USA military report on that incident publicized by the Pentagon last month without being fully released found that multiple individual and institutional failures left the US troops vulnerable to the ambush.