Somalia faces a test of its stability as foreign troops begin to withdraw, according to the BBC. Funding for its security forces is under pressure, and a political dispute threatens plans for the country's first direct democratic elections in decades.

Some analysts fear Somali security forces may not be able to handle the nation's security without external support. Abdisalam Guleid, a former deputy director of Somalia's National Security Agency, told the BBC that the security situation is increasingly precarious. He warned that the withdrawal could leave Mogadishu vulnerable to a takeover similar to the Taliban's in Afghanistan in 2021. "I don't think Mogadishu will be able to defend itself," he said.

The Islamist militant group al-Shabab, which is affiliated with al-Qaeda, already controls large parts of the country despite the presence of about 12,000 African Union troops. Ugandan troops, the largest AU contingent, began withdrawing last month and are expected to complete the withdrawal next year. The BBC reports that Ethiopia is also planning to withdraw about 3,000 of its more than 7,000 troops.

The United States has said it will extend funding for the UN Support Office in Somalia for a year, after earlier announcing cuts. Washington contributes about a quarter of the office's $500m annual budget.

Somalia's Information Minister, Abdifatah Qasim Mohamud, rejected concerns about the withdrawals. He told the BBC that Somali troops had already taken over some positions vacated by Ugandan forces. "There will be no change in the country's security situation or in the areas they have vacated," he said.

Ugandan security analyst Freddie David Egesa argues that the withdrawal could push Somalia's political leaders to take greater responsibility for the country's future. Omar Mahmood, an analyst at the International Crisis Group, said Somali forces are under considerable pressure as they fight al-Shabab while taking over positions held by foreign troops.