ThePolitical history of Somalia covers the development of the Somali government and institutional systems following the collapse of theSiad Barre regime in 1991.

Following the fall of theSiad Barre regime in 1991, theIslamic Courts Union was formed to address lawlessness[1] in Somalia.
The residents ofMogadishu were reportedly happy with the authority of the Islamic Courts Union's. There were fewer guns on the streets and people were able to move more freely around the city without fear of attack after they took control.[2]
In an interview featured in theBBC Online Somali section in June 2006,Sharif Sheikh Ahmed said: "the Union of Islamic Courts was established to ensure thatSomali people suffering for 15 years would gain peace and full justice and freedom from theanarchic rule ofwarlords who refuted their people to no direction."
By 2006, theIslamic Courts Union (ICU), gained control of much of the southern part of the country. The Islamic Courts Union's influence was enhanced by wealthy financial donors who sought to enable the Islamic Courts Union to bring stability to the country.[3] According toChatham House "The Courts achieved the unthinkable, unitingMogadishu and re-establishing peace and security".[4]
The early 2000s had seen the creation of fledgling interim federal administrations. TheTransitional National Government (TNG) was established in 2000, followed by the formation of its successor theTransitional Federal Government (TFG) in 2004.[5][6][7] The Transitional Federal Government (TFG) was internationally recognised as Somalia'sprovisional government until 20 August 2012, when its tenure officially ended.[8] It was established as one of theTransitional Federal Institutions (TFIs) of government as defined in theTransitional Federal Charter (TFC) adopted in November 2004 by theTransitional Federal Parliament (TFP). The Transitional Federal Government officially comprised theexecutive branch of government, with the TFP serving as thelegislative branch. The government was headed by thePresident of Somalia, to whom thecabinet reported through thePrime Minister. However, it was also used as a general term to refer to all three branches collectively.
Between 31 May and 9 June 2008, representatives of Somalia's Transitional Federal Government and theAlliance for the Re-liberation of Somalia (ARS) participated in peace talks inDjibouti Agreement brokered by the former United Nations Special Envoy to Somalia,Ahmedou Ould-Abdallah. The conference ended with a signed agreement calling for the withdrawal ofEthiopian troops in exchange for the cessation of armed confrontation. Parliament was subsequently expanded to 550 seats to accommodate the ARS members.
An indirectpresidential election was held inSomalia on 30 January 2009.[9] TheTransitional Federal Parliament elected ARS chairmanSheikh Sharif Sheikh Ahmed, to the office ofPresident of Somalia in January 2009. His administration successfully brought theFederal Government of Somalia throughtransitional status following the collapse of the previous governing administration in 1991.
As part of the official "Roadmap for the End of Transition", a political process which provided clear benchmarks leading toward the establishment of permanent democratic institutions in Somalia by late August 2012,[10] Somali government officials met in the northeastern town ofGarowe in February 2012 to discuss post-transition arrangements. After extensive deliberations attended by regional actors and international observers, the conference ended in a signed agreement between TFG President Sharif Sheikh Ahmed, Prime Minister Abdiweli Mohamed Ali, Speaker of Parliament Sharif Adan Sharif Hassan, Puntland President Abdirahman Mohamed Farole,Galmudug President Mohamed Ahmed Alim and Ahlu Sunnah Wal Jama'a representative Khalif Abdulkadir Noor stipulating that: a) a new 225 memberbicameralparliament would be formed, consisting of an upper house seating 54 Senators as well as a lower house; b) 30% of the National Constituent Assembly (NCA) is earmarked for women; c) the President is to be appointed via a constitutional election; and d) the Prime Minister is selected by the President and subsequently names the Cabinet.[11][12] On June 23, 2012, the Somali federal and regional leaders met again and approved a draft constitution after several days of deliberation.[13] The National Constituent Assembly overwhelmingly passed thenew constitution on August 1, with 96% of the 645 delegates present voting for it, 2% against it, and 2% abstaining.[14][15] To come into effect, it must be ratified by the new parliament.[16]
Concurrent with the end of the TFG's interim mandate on August 20, 2012, theFederal Parliament of Somalia was inaugurated, ushering in theFederal Government of Somalia, the first permanent central government in the country since the start of the civil war.[8]
On September 10, 2012, parliament electedHassan Sheikh Mohamud as the new President of Somalia.[17]
At the behest of Somalia's federal authorities, the 15-memberUN Security Council unanimously approvedResolution 2093 on March 6, 2013 to suspend the 21-yeararms embargo on Somalia, the oldest such global weapons blockade.[18] The endorsement officially lifts the purchase ban on light weapons for a one-year period, but retains certain restrictions on the procurement of heavy arms.[18] The repeal is slated to be reviewed in 2014.[19]
On 11 February 2015, the Federal Parliament during its fifth session approved the Independent National Electoral Commission. 113 MPs voted in favour of the bill, 21 against it, and 10 abstained. The president is now slated to sign the new law.[20]

On 8 February 2017, Somali MPs electedMohamed Abdullahi Mohamed.[21] This took place after months of preparation whereby 14,000 clan elders and regional figures across Somalia selected 275 members of parliament and 54 senators.[22] A joint statement by the international community including theUN andEuropean Union warned of "egregious cases of abuse of the electoral process" in light of reports of votes being sold for up to $30,000 apiece.[23]