Northern Somalia declares independence from the rest of Somalia as the Republic of Somaliland but is not recognized by the international community.

Somaliland (Somali: Soomaaliland; Arabic: mllnd, Ar a-ml), officially the Republic of Somaliland (Somali: Jamhuuriyadda Soomaaliland, Arabic: Jumhryat mllnd), is a de facto state in the Horn of Africa, considered internationally to be part of Somalia. Somaliland lies in the Horn of Africa, on the southern coast of the Gulf of Aden. It is bordered by Djibouti to the northwest, Ethiopia to the south and west, and the uncontested part of Somalia to the east. Its claimed territory has an area of 176,120 square kilometres (68,000 sq mi), with approximately 5.7 million residents as of 2021. The capital and largest city is Hargeisa. The government of Somaliland regards itself as the successor state to British Somaliland, which, as the briefly independent State of Somaliland, united in 1960 with the Trust Territory of Somaliland (the former Italian Somaliland) to form the Somali Republic.Somaliland was first inhabited around 10,000 years ago during the Neolithic age. The ancient shepherds raised cows and other livestock and it has the most vibrant rock art paintings in Africa. Throughout the Middle Ages, Arab immigrants arrived in Somaliland, including the Muslim sheikhs Ishaaq bin Ahmed, who founded the Isaaq clan, and Abdirahman bin Isma'il al-Jabarti who founded the Darod clan, who both travelled from Arabia to Somaliland and married into the local Dir clan, which have been described as legendary stories. Also during the Middle Ages, Somali empires dominated the regional trade, including the Sultanate of Ifat and the Adal Sultanate.

In the 18th century, the Isaaq Sultanate, a Somali successor state to the Adal Sultanate, was established by Sultan Guled Abdi at Toon. The sultanate spanned parts of the Horn of Africa and covered the central regions of modern-day Somaliland. It had a robust economy and trade was significant at its main port of Berbera and the smaller port town of Bulhar, as well as eastwards at the frankincense-exporting port towns of Heis, Karin, and El-Darad.In the late 19th century, the United Kingdom signed agreements with the Habr Awal, Garhajis, Habr Je'lo, Warsangeli, Issa and Gadabuursi clans establishing a protectorate.The Dervishes led by Muhammad Abdullah Hassan were against the protection agreements signed with Britain with the Somali sultans. After a span of 20 years, the Dervishes were finally defeated in one of the first aerial bombardments in Africa in 1920 Somaliland Campaign. The largest of the clans, the Dhulbahante, who did not sign a treaty of protection with the British (due to the fact that the Italians considered part of the Dhulbahante as subjects of the Italian-protected Sultan of the Majeerteen clan) were the foremost proponents of the movement.On 26 June 1960, the protectorate gained independence as the State of Somaliland, before five days later voluntarily uniting with the Trust Territory of Somaliland, following its separate independence, to form the Somali Republic. A lawful union occurred between the two territories through their elected representatives. On 27 June 1960, the Legislative Assembly of Somaliland unanimously enacted an Act of Union with Somalia which propounded the two entities shall forever remain united.In 1961, Somalia took control of state institutions, which was rejected in the former State of Somaliland and resulted in the Somaliland residents boycotting the vote on the Somali constitution. In December 1961, the revolt in the north was started by soldiers of the former State of Somaliland who took control of large cities in the north. A group of officers took control of the radio station in Hargeisa, declaring the end of the unity between Somalia and Somaliland.In April 1981 the Somali National Movement (shortened SNM) was founded, which led to the Somaliland War of Independence. In 1988, at the height of the war, the Siad Barre government began a crackdown against the Hargeisa-based SNM and other militant groups, which were among the events that led to the Somali Civil War. The conflict left Somalia's economic and military infrastructure severely damaged. Following the collapse of Barre's government in early 1991, local authorities, led by the SNM, unilaterally declared independence from Somalia on 18 May of the same year and reinstated the borders of the former short-lived independent State of Somaliland.Since 1991, the territory has been governed by democratically elected governments that seek international recognition as the government of the Republic of Somaliland. The central government maintains informal ties with some foreign governments, who have sent delegations to Hargeisa. Ethiopia also maintains a trade office in the region. However, Somaliland's self-proclaimed independence has not been officially recognised by any country or international organisation. It is a member of the Unrepresented Nations and Peoples Organization, an advocacy group whose members consist of indigenous peoples, minorities and unrecognised or occupied territories.

Somalia, officially the Federal Republic of Somalia (Somali: Jamhuuriyadda Federaalka Soomaaliya; Arabic: جمهورية الصومال الفيدرالية), is a country in the Horn of Africa. The country is bordered by Ethiopia to the west, Djibouti to the northwest, the Gulf of Aden to the north, the Indian Ocean to the east, and Kenya to the southwest. Somalia has the longest coastline on Africa's mainland. Its terrain consists mainly of plateaus, plains, and highlands. Hot conditions prevail year-round, with periodic monsoon winds and irregular rainfall. Somalia has an estimated population of around 15 million, of which over 2 million live in the capital and largest city Mogadishu, and has been described as Africa's most culturally homogeneous country. Around 85% of its residents are ethnic Somalis, who have historically inhabited the country's north. Ethnic minorities are largely concentrated in the south. The official languages of Somalia are Somali and Arabic. Most people in the country are Muslims, the majority of them Sunni.In antiquity, Somalia was an important commercial center. It is among the most probable locations of the fabled ancient Land of Punt. During the Middle Ages, several powerful Somali empires dominated the regional trade, including the Ajuran Sultanate, the Adal Sultanate, and the Sultanate of the Geledi.

In the late 19th century, Somali Sultanates like the Isaaq Sultanate and the Majeerteen Sultanate were colonized by Italy, Britain and Ethiopia. European colonists merged the tribal territories into two colonies, which were Italian Somaliland and the British Somaliland Protectorate. Meanwhile, in the interior, the Dervishes lead by Mohammed Abdullah Hassan engaged in a two-decade confrontation against Abyssinia, Italian Somaliland, and British Somaliland and were finally defeated in the 1920 Somaliland Campaign. Italy acquired full control of the northeastern, central, and southern parts of the area after successfully waging the Campaign of the Sultanates against the ruling Majeerteen Sultanate and Sultanate of Hobyo. In 1960, the two territories united to form the independent Somali Republic under a civilian government.The Supreme Revolutionary Council seized power in 1969 and established the Somali Democratic Republic, brutally attempting to squash the Somaliland War of Independence in the north of the country. The SRC subsequently collapsed 22 years later, in 1991, with the onset of the Somali Civil War and Somaliland soon declared independence. Somaliland still controls the northwestern portion of Somalia representing just over 27% of its territory. Since this period most regions returned to customary and religious law. In the early 2000s, a number of interim federal administrations were created. The Transitional National Government (TNG) was established in 2000, followed by the formation of the Transitional Federal Government (TFG) in 2004, which reestablished the Somali Armed Forces. In 2006, with a US backed Ethiopian intervention, the TFG assumed control of most of the nation's southern conflict zones from the newly formed Islamic Courts Union (ICU). The ICU subsequently splintered into more radical groups, such as Al-Shabaab, which battled the TFG and its AMISOM allies for control of the region.By mid-2012, the insurgents had lost most of the territory they had seized, and a search for more permanent democratic institutions began. Despite this, insurgents still control much of central and southern Somalia, and wield influence in government-controlled areas, with the town of Jilib acting as the insurgents' de-facto capital. A new provisional constitution was passed in August 2012, reforming Somalia as a federation. The same month, the Federal Government of Somalia was formed and a period of reconstruction began in Mogadishu. Somalia has maintained an informal economy mainly based on livestock, remittances from Somalis working abroad, and telecommunications. It is a member of the United Nations, the Arab League, African Union, Non-Aligned Movement, and the Organisation of Islamic Cooperation.