In addition, the USA had armed surveillance aircraft overhead.
Three of the four wounded USA service members were evacuated to receive additional medical treatment, the military said.
However, critics of the military's strategy have argued USA forces should exercise more caution in Africa where US interests are limited. The last killing of a US service member in Somalia was in May 2017 during an operation about 40 miles west of Mogadishu, Stars and Stripes reported.
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 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.More news: Asus has a monster phone for serious mobile gamers
More news: Injured Serena withdraws from French Open, Nadal books last eight spot
More news: Rafael Nadal vs Diego Schwartzman, French Open 2018
Friday's attack in Jubaland is likely to put renewed scrutiny on United States counter-terror operations in Africa.
But President Donald Trump in early 2017 approved expanded military operations against al-Shabab, leading to an increase in us military personnel to more than 500 and the launch of dozens of drone strikes.
"My thoughts and prayers are with the families of our serviceman who was killed and his fellow servicemen who were wounded in Somolia (sic)", he tweeted.
Al-Shabaab is fighting to overthrow Somalia's central government and establish its own rule based on its interpretation of Islamic law. Officials worry the extremist group is in the midst of a resurgence after losing much of the territory it once held in Somalia and many of its fighters in the last several years.
But al-Shabab has continued to carry out deadly suicide bomb attacks in Mogadishu, while retaining a strong presence in other parts of the country.
Around 500 American forces are stationed throughout Somalia including a number of Special Operations units comprised Army Green Berets, Marine Raiders and Navy SEALS.