The withdrawal was ordered to be completed by January 15, the same deadlines for drawdowns in Afghanistan and Iraq
President Donald Trump has ordered nearly all American troops to withdraw from Somalia, US officials said on Friday, part of a global pullback by the Republican president before he leaves office next month that will also see him drawdown forces in Afghanistan and Iraq.
The United States has about 700 troops in Somalia focused on helping local forces defeat the al Qaeda-linked al Shabaab insurgency. The mission has received little attention in the United States, but has been considered a cornerstone of the Pentagon's global efforts to combat al Qaeda.
In a statement, the Pentagon sought to play down the implications of a withdrawal that experts have said could undermine security in Somalia.
"While a change in force posture, this action is not a change in U.S. policy," the Pentagon said.
"The U.S. will retain the capability to conduct targeted counterterrorism operations in Somalia, and collect early warnings and indicators regarding threats to the homeland."
The United States already pulled out of Somalia's cities of Bossaso and Galkayo earlier this year.
As of last month, US troops were still in the southern port city of Kismayo, Baledogle airbase in the Lower Shabelle region, and in the capital Mogadishu.
A US defense official, speaking on condition of anonymity, said nearly all US forces would leave Somalia, although some would remain in Mogadishu.
The Pentagon statement, which was unsigned, said an unspecified number of forces in Somalia would be moved to neighbouring countries, allowing them to carry out cross-border operations. Others would be reassigned outside East Africa.
A congressional aide, speaking on condition of anonymity, said the withdrawal comes at a difficult time for Somalia, ahead of both parliamentary and presidential elections, and will present an early dilemma for President-elect Joe Biden.
Somalia has been riven by civil war since the early 1990s, but over the past decade an African Union-backed peacekeeping force and US troops have clawed back control of Mogadishu and large swathes of the country from al Shabaab.
'Continuous security partnership'
Somali President Mohamed Abdullahi Mohamed had appeared to be lobbying in public against the drawdown, writing on Twitter in October that US support "has enabled us to effectively combat Al-Shabab and secure the Horn of Africa."
"A victory through this journey and for Somali-US partnership can only be achieved through continuous security partnership and capacity building support," he wrote.
Another US official said the US presence in Somalia was a point of contention between Trump and his former defence secretary, Mark Esper, who Trump fired last month.
According to the official, Trump pushed for a drawdown citing a wish by Kenya "to police their own neighbourhood," but Esper resisted.
Kenya has backed the Somali government in a number of areas and contributes troops to the African Union-led force.
Al Shabaab, which has fought for more than a decade to establish rule based on its strict interpretation of Islam's sharia law, often carries out gun assaults and bombings on both military and civilian targets and has also attacked regional targets, especially in Kenya.
An attack on a US military base in Kenya killed three Americans earlier this year.
Many of the US forces in Somalia train and support Danab, the Somali special forces at the core of a mission to kill al Shabaab leaders. Danab, which has around 850 soldiers but had planned to grow to around 3,000, has been Somalia's most effective fighting force.
It is the third major withdrawal since Trump installed acting Defence Secretary Christopher Miller, a former Green Beret and counterterrorism official, to replace Esper at the Pentagon following Trump's election defeat.
The US defence official said the withdrawal was ordered to be completed by January 15 -- the same deadlines for drawdowns in Afghanistan and Iraq.