The US Africa Command (AfriCom) broke the news in a statement on Wednesday, saying the Tuesday evening attack against the al-Shabab terrorist group took place 60 miles (96 kilometers) northwest of the capital, Mogadishu, and was coordinated with Somalia’s government.
"Al-Shabab has publicly committed to planning and conducting attacks against the US and our partners in the region," the force said in a statement.
Earlier this month, Washington warned its diplomatic staff in Mogadishu of an imminent threat and ordered all non-essential staff to leave the city.
The AfriCom statement did not provide further details about the exact number of the casualties. It was not clear if there were any civilian casualties either.
The US military has stepped up its airstrikes in the Horn of Africa nation after getting President Donald Trump’s approval for expanded military operations there.
AfriCom said Sunday that it had carried out more drone attacks in Somalia over the weekend, hitting three al-Shabab and Daesh targets in less than 24 hours.
"US forces will continue to use all authorized and appropriate measures to protect Americans and to disable terrorist threats," said an AfriCom spokeswoman.
Al-Shabab has pledged allegiance to al-Qaeda and "has publicly committed to planning and conducting attacks against the US and our partners in the region," she added.
The Pentagon has been carrying out airstrikes and ground raids in Somalia for a decade, initially using helicopters and AC-130 gunships.
In June 2011, American forces began using drones to carry out the strikes, in a mission which has so far failed to uproot militancy in the country.
Despite being ousted from large parts of the south and central Somalia, al-Shabab continues deadly attacks across the country, which has been ravaged by decades of war and poverty.
The militant group aims to oust the western-backed government in Mogadishu and drive out African Union peacekeeping troops. It has been carrying out militancy since 2006.
The AU announced last week that it was withdrawing 1,000 of its troop as part of a plan to fully withdraw from the heavily-fractured country by 2020.