Somalia, officially the Federal Republic of Somalia is a country located in the Horn of Africa. It 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 the mainland of Africa, with a seaboard that stretches 3,025 kilometres (1,880 mi).
In antiquity, Somalia was an important centre for commerce with the rest of the ancient world, 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 Ajuuraan Sultanate, the Adal Sultanate and the Geledi Sultanate. In the late nineteenth century, through a succession of treaties with these kingdoms, the British and Italians gained control of parts of the coast, and established British Somaliland and Italian Somaliland. In the interior, the Dervish State wherein Muhammad Abdullah Hassan was leader successfully repulsed the British Empire four times and forced it to retreat to the coastal region. Italian occupation lasted until 1941, yielding to British military administration. British Somaliland would remain a protectorate, while Italian Somaliland in 1949 became a United Nations Trusteeship under Italian administration, the Trust Territory of Somaliland.
Though, in 1960, the two regions united to form the independent Somali Republic under a civilian government. In 1991, following the collapse of the government of Siad Barre, the Republic of Somaliland unilaterally declared its independence from Somalia, reinstating the borders of former British Somaliland, and has been governed by democratically elected leaders since. Somaliland's independence, however, has not been recognised by any foreign country or international organisation.
Somalia has a population of around 10 million. About 85% of local residents are ethnic Somalis, Somali and Arabic are the official languages of Somalia, both of which belong to the Afro-Asiatic family. Most people in the territory are Muslims, the majority being Sunni.