US President Donald Trump has ordered the withdrawal of nearly all US troops from Somalia by 15 January, the Pentagon has said.
The US has about 700 troops in the country helping local forces battle al-Shabab and Islamic State militants.
US officials said some of the troops would move to neighbouring countries, allowing for cross-border operations.
In recent months President Trump has issued similar orders to reduce US forces in Iraq and Afghanistan.
He has long called for US troops to come home and has criticised US military interventions for being costly and ineffective.
The withdrawal order - which would see troops redeployed just days before Mr Trump leaves office - reverses the policy of former US defence secretary Mark Esper, who was sacked last month and favoured maintaining the US presence in Somalia.