Armed clashes broke out on Thursday, with fighting between armed groups loyal to rival politicians.

Residents described the events as the worst wave of fighting the city has seen in years. Armed clashes erupted in the Somali capital, Mogadishu, which residents on Thursday described as the worst violence the city has witnessed in years.

Residents and analysts said government forces clashed with armed groups loyal to two of the president's opponents. They said the fighting stemmed from parliament's controversial decision to extend the term of President Hassan Sheikh Mohamud.

Although it was not clear how the fighting began, the president's opponents had called for protests on Thursday, and their forces had moved close to government positions.

The following is an overview of the violence in the East African country and why these events matter.

What happened?

Before dawn on Thursday, residents of Mogadishu, a city of around three million people, said they began hearing gunfire, mortar fire and rocket-propelled grenades coming from a neighbourhood where government forces and gunmen loyal to the president's opponents had been massing for days.

Videos show streets that were almost empty, and document the sounds of gunfire and explosions. No immediate information on casualties was available; residents said fighting was still ongoing on Thursday afternoon, and that some residents of the capital were fleeing to safer neighbourhoods.

One resident, Fartun Dahir (27), a mother of two, said: "I no longer trust that it is possible to live in this country; none of the politicians seem to care about our safety." She added: "I am worried about my children."

Fighting broke out near the homes of two opposition leaders: former president Sharif Sheikh Ahmed and former prime minister Hassan Khayre. Both residential areas also serve as headquarters for these two men's special security forces, making them centres of military power within Mogadishu.

Samira Gaid, a political analyst in the city, said the clashes began after government forces attempted to remove Khayre's forces from a neighbourhood near the presidential palace.

Gaid added, in an interview on Thursday, that clan elders, who play an influential role in Somali politics, were trying to negotiate an end to the fighting.

Limited clashes had broken out on Wednesday. That night, Ahmed said that Mohamud had ordered "a continuous and indiscriminate military attack, whose apparent aim is to kill me." Speaking to journalists, he added: "If I have one bullet left, I will respond by shooting anyone who shoots at me."

What led to the fighting?

Tensions had risen since opposition leaders, including Ahmed and Khayre, announced last month their intention to lead protests on Thursday against what they described as the illegal extension of the president's term.

Mohamud's term was due to end on 15 May, but the Somali parliament, in both its chambers, voted in March, with encouragement from the president, to extend his mandate by one year, a move denounced by opposition politicians.

In mid-May, negotiations sponsored by the United States and Britain to defuse what was considered a constitutional crisis collapsed.

Analyst Gaid said the talks began too late to be meaningful or effective. President Mohamud had portrayed the extension of his term, and that of parliament members, as part of a plan to strengthen direct democracy and move Somalia from an indirect electoral system, in which clans and regional leaders choose lawmakers, to a "one person, one vote" system.

Opposition politicians, who call themselves the "Somali Future Council", argued in turn that the plan would entrench the president's power and was not feasible. They pointed out that many Somalis would be denied the right to vote in direct elections, given that the armed group al-Shabaab controls parts of the country.

On Thursday, the US embassy described the fighting as reckless and urged calm, stating that "Somali leaders from all sides have a responsibility to maintain stability and resolve differences through peaceful means." Other countries also called for dialogue. Omar Mahmood, an analyst at the International Crisis Group, said the fighting was "an inevitable result of the absence of consensus."

What is the broader context?

In December, President Trump described Somalia as "not even a country." Nevertheless, the US Department of Defense (the Pentagon) continues to work with the government in Mogadishu, and has carried out dozens of airstrikes against insurgent targets in the country.

For 15 years, Somali politicians have worked to build a stable state under a federal system, after years without any recognised central government, which is the precise definition of a failed state.

Since 2012, the country has completed two full electoral cycles, although the end of the previous electoral term in 2021 also saw serious clashes in Mogadishu. The government faces significant security challenges and relies on what is known as the African Union and United Nations peacekeeping force to curb al-Shabaab.

Last month, a report by the United Nations and aid organisations revealed that around 1.88 million children in Somalia are likely to need treatment for severe acute malnutrition this year, while some six million people (equivalent to 30 per cent of the population) face acute food insecurity.

Nevertheless, Somalia has played an increasingly important geopolitical role, due partly to its coastal location overlooking the Gulf of Aden, near the Red Sea. These waterways are vital arteries for global shipping, and their importance has grown particularly amid the closure of the Strait of Hormuz.