Thirty-five people died in total, according to a local police chief in the central Hiraan province.
Security forces say attack by al-Shabab on Tawakal Hotel is over with the death of all gunmen involved.
Aid groups say they cannot get crucial supplies to those who need it most due to US sanctions.
Humanitarian agencies have issued warnings for months about extreme hunger and malnutrition.
At least six others wounded in the attack on a military base near the capital Mogadishu.
The action comes as the US seeks to increase focus on exposing and disrupting terrorist financing networks in Africa.
President Mohamud has launched a counterinsurgency campaign against the al-Qaeda-linked group.
The weekend's deadly hotel siege served as a reminder that the militants remain a potent threat.
The UN is warning the nation is facing its worst drought in decades.
L?esercito americano sostiene di avere ucciso Abdullahi Nadir, cofondatore del gruppo collegato ad al-Qaeda. Il governo somalo ha confermato, spiegando che si trattava di un?operazione militare congiun...