Present-day Somaliland is part of an Arab sultanate since the seventh century and becomes part of Muscat in the seventeenth century. The northern coast is occupied by Egypt between 1875 and 1887: in that year Britain establishes the Protectorate of British Somaliland, subordinate to Aden. In 1905 British Somaliland becomes a separate British colony. It is occupied by Italy in 1940, but in 1941 Italy is defeated by Britain. Meanwhile, rapid progress toward self-government is made in British Somaliland. Elections for a parliament are held in 1960, and one of the first acts of the new parliament is to request that Britain grants the area independence so that it could unite with Italian Somaliland when the latter becomes independent.

The protectorate becomes independent in 1960 as the State of Somaliland. Dominant party in Somaliland is the Somali National League of Muhammad Haji Ibrahim Egal, who is prime minister in 1960. It merges with Italian Somalia in 1960 to form the Somali Republic. Somalia becomes a presidential democracy, dominated by the Somali Youth League of Aden Abdullah Osman Dar (president between 1960 and 1967) and Abdirashid Ali Shermarke (president between 1967 and 1969). When Shermarke is assasinated in 1969, the army under Muhammad Siyad Barre seizes power. The country, renamed Somali Democratic Republic, is governed by a Surpreme Revolutionary Council.

Barre establishes a socialist one-party state in 1976 when the Somali Revolutionary Socialist Party becomes to sole allowed party. Barre stages the 1977 war with Ethiopia over the Somali populated Ogaden region. Within Somalia, Barre's regime confront insurgencies in the northeast and northwest, whose aim is to overthrow his government. By 1988 Barre is openly at war with sectors of his nation.The warfare in the northwest sped up the decay already evident elsewhere in the republic. Barre is overthrown in 1991.

Somalia is renamed Somali Republic but the state ceases to exist: Somalia dissolves into civil war and clan banditry. That year former Somaliland secedes from Somalia as the Republic of Somaliland is founded. This seccesion is internationally not recognized. Somaliland is a presidential democratic republic. The first president is Abdurahman Ahmad Ali "Tur" of the Somali National Movement. He is succeeded in 1993 by Muhammad Haji Ibrahim Egal. Egal founds in 2001 the Ururka Dimuqraadiga Ummadda Bahawday (Allied People's Democratic Party, UDUB). After his death e is succeeded by Dahir Riyale Kahin.