Somalia, formally known as the Federal Republic of Somalia (Somali: Jamhuuriyadda Federaalka Soomaaliya; Arabic: جمهورية الصومال الفيدرالية), is a nation in the Horn of Africa. 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 border of the nation. Somalia boasts the continent's longest coastline. Its landscape is mostly made up of plateaus, plains, and hills. Hot weather prevails all year, with monsoon winds and infrequent rainfall. Somalia has an estimated population of over 15 million people, with over 2 million living in Mogadishu, the nation's capital and biggest city. It has been called as Africa's most culturally homogenous country. Approximately 85 percent of its people are ethnic Somalis, who have traditionally lived in the country's north. The majority of ethnic minorities live in the south. Somali and Arabic are Somalia's official languages. The majority of people in the nation are Muslims, the vast majority of whom are Sunni.
Somalia was a significant trading hub in antiquity. It is one of the most likely sites of the legendary ancient Land of Punt. Several major Somali dynasties controlled regional commerce throughout the Middle Ages, notably the Ajuran Sultanate, the Adal Sultanate, and the Sultanate of the Geledi.
Somali Sultanates such as the Isaaq Sultanate and the Majeerteen Sultanate were colonized by Italy, Britain, and Ethiopia in the late nineteenth century. The tribal areas were combined by European colonists into two colonies: Italian Somaliland and the British Somaliland Protectorate. Meanwhile, in the interior, the Dervishes, led by Mohammed Abdullah Hassan, fought for two decades against Abyssinia, Italian Somaliland, and British Somaliland until being defeated in the 1920 Somaliland Campaign. After successfully fighting the Campaign of the Sultanates against the governing Majeerteen Sultanate and Sultanate of Hobyo, Italy gained complete control of the northeastern, center, and southern sections of the province. The two regions merged in 1960 to become the autonomous Somali Republic, which was governed by a civilian administration.
The Supreme Revolutionary Council took control in 1969 and founded the Somali Democratic Republic, violently suppressing the Somaliland War of Independence in the country's north. The SRC crumbled 22 years later, in 1991, with the start of the Somali Civil War, and Somaliland gained independence shortly after. Somaliland still dominates the northwest corner of Somalia, accounting for little more than a quarter of the country's total geographical area. Most places have resorted to customary and religious law since this time. A number of temporary federal governments were established in the early 2000s. The Transitional National Government (TNG) was formed in 2000, and the Transitional Federal Government (TFG) was formed in 2004, reestablishing the Somali Armed Forces.
The TFG took control of most of the country's southern war zones from the newly created Islamic Courts Union in 2006, thanks to a US-backed Ethiopian invasion (ICU). The ICU then fragmented into more extreme organizations, like Al-Shabaab, who fought for control of the area against the TFG and its AMISOM allies.
By mid-2012, the rebels had lost most of their seized territory, and a quest for more permanent democratic institutions started. Despite this, rebels continue to control most of central and southern Somalia and have influence in government-controlled regions, with Jilib serving as the insurgents' de-facto capital. In August 2012, a new interim constitution was enacted, rebuilding Somalia as a federation. The Federal Government of Somalia was created the same month, and rebuilding in Mogadishu started. Somalia has maintained an informal economy based mostly on livestock, remittances from Somalis working abroad, and telecommunications. It belongs to the UN, the Arab League, the African Union, the Non-Aligned Movement, and the Organization of Islamic Cooperation.