# List of prime ministers of Somalia

The prime minister of Somalia (Somali: Ra'iisul wasaaraha Soomaaliya) is the head of government of Somalia. There have been 22 official prime ministers since the office was created in 1956. The first prime minister was Abdullahi Issa, who served prior to independence in the Trust Territory of Somaliland. The current prime minister of the Federal Republic of Somalia is Hamza Abdi Barre, approved by the House of the People on 25 June 2022.

## List

| No. | Portrait | Name (Birth–Death) | Term of office | Term of office | Term of office | Political party | Election |
| No. | Portrait | Name (Birth–Death) | Took office | Left office | Time in office | Political party | Election |
| • Trust Territory of Somaliland (1956–1960) • ||||||||
| — | | Abdullahi Issa (1921–1988) | 29 February 1956 | 1 July 1960 | 4 years, 123 days | SYL | 1956 1959 |
| • Somali Republic (1960–1969) • ||||||||
| 1 | | Muhammad Haji Ibrahim Egal (1928–2002) | 1 July 1960 | 12 July 1960 | 11 days | SYL | — |
| 2 | | Abdirashid Shermarke (1919–1969) | 12 July 1960 | 14 June 1964 | 6 years, 337 days | SYL | — |
| 3 | | Abdirizak Haji Hussein (1924–2014) | 14 June 1964 | 15 July 1967 | 3 years, 31 days | SYL | 1964 |
| 4 | | Muhammad Haji Ibrahim Egal (1928–2002) | 15 July 1967 | 21 October 1969 | 2 years, 98 days | SYL | 1969 |
| • Somali Democratic Republic (1969–1991) • ||||||||
| Post Abolished (21 October 1969–1 February 1987) ||||||||
| 5 | | Mohammad Ali Samatar (1931–2016) | 1 February 1987 | 3 September 1990 | 3 years, 214 days | SRSP | — |
| 6 | | Hawadle Madar (1939–2005) | 3 September 1990 | 24 January 1991 | 143 days | SRSP | — |
| • Interim Government of Somalia (1991–1997) • ||||||||
| 7 | | Umar Ghalib (1930–2020) | 24 January 1991 | May 1993 (De facto to 3 January 1997) | 5 years, 345 days | USC | — |
| Vacant (May 1993–8 October 2000) ||||||||
| • Transitional national government of Somalia (2000–2004) • ||||||||
| 8 | | Ali Khalif Galaydh (1941–2020) | 8 October 2000 | 28 October 2001 | 1 year, 20 days | Independent | — |
| — | | Osman Jama Ali (born 1941) Acting | 28 October 2001 | 12 November 2001 | 15 days | Independent | — |
| 9 | | Hassan Abshir Farah (1945–2020) | 12 November 2001 | 8 December 2003 | 2 years, 26 days | Independent | — |
| 10 | | Muhammad Abdi Yusuf (born 1941) | 8 December 2003 | 23 December 2004 | 1 year, 15 days | Independent | — |
| • Transitional federal government of Somalia (2004–2012) • ||||||||
| 11 | | Ali Mohammed Ghedi (born 1952) | 23 December 2004 | 30 October 2007 (Resigned) | 2 years, 311 days | Independent | — |
| — | | Salim Aliyow Ibrow (born 1942) Acting | 30 October 2007 | 24 November 2007 | 25 days | Independent | — |
| 12 | | Nur Hassan Hussein (1938–2020) | 24 November 2007 | 14 February 2009 | 1 year, 82 days | Independent | — |
| 13 | | Omar Sharmarke (born 1960) | 14 February 2009 | 24 September 2010 | 1 year, 222 days | Independent | — |
| — | | Abdiwahid Gonjeh (born 1962) Acting | 24 September 2010 | 1 November 2010 | 38 days | Independent | — |
| 14 | | Mohamed Abdullahi Mohamed (born 1962) | 1 November 2010 | 19 June 2011 | 230 days | Independent | — |
| 15 | | Abdiweli Gaas (born 1965) | 19 June 2011 | 20 August 2012 | 1 year, 62 days | Independent | — |
| • Federal Republic of Somalia (2012–present) • ||||||||
| — | | Abdiweli Gaas (born 1965) Acting | 20 August 2012 | 17 October 2012 | 58 days | Independent | — |
| 16 | | Abdi Farah Shirdon (born 1958) | 17 October 2012 | 21 December 2013 | 1 year, 65 days | Independent | — |
| 17 | | Abdiweli Sheikh Ahmed (born 1959) | 21 December 2013 | 24 December 2014 | 1 year, 3 days | Independent | — |
| 18 | | Omar Sharmarke (born 1960) | 24 December 2014 | 1 March 2017 | 2 years, 67 days | Independent | 2016 |
| 19 | | Hassan Ali Khaire (born 1968) | 1 March 2017 | 25 July 2020 | 3 years, 146 days | Independent | — |
| — | | Mahdi Mohammed Gulaid (born 1973) Acting | 25 July 2020 | 23 September 2020 | 60 days | Independent | — |
| 20 | | Mohamed Hussein Roble (born 1963) | 23 September 2020 | 26 June 2022 | 1 year, 276 days | Independent | — |
| 21 | | Hamza Abdi Barre (born 1974) | 26 June 2022 | Incumbent | 2 years, 253 days | UPD | 2021–22 |
Somali prime ministers are given a new number even when they are reappointed. For example, former prime minister Omar Sharmarke wrote on his Twitter page, "13th and 18th Prime Minister of Somalia." The seat had long been vacant since Umar Ghalib stepped down as prime minister, but Ali Khalif Galaydh became the eighth in August 2000. The acting prime minister is not numbered. For example, Osman Jama Ali was acting prime minister between Ali Khalif Galaydh, the eighth, and Hassan Abshir Farah, the ninth, he didn't get a number. In June 2022, Hamza Abdi Barre succeeded the 20th Mohamed Hussein Roble as the 21st Prime Minister.