ancient artsRuins of the ancient city of Amud.

Somalis are an ethnic group located in the Horn of Africa, also known as the Somali Peninsula. The overwhelming majority of Somalis speak the Somali language, which is part of the Cushitic branch of the Afro-Asiatic language family.

The ancestors of the Somali people were an important link in the Horn of Africa connecting the region's commerce with the rest of the ancient world. Somali sailors and merchants were the main suppliers of frankincense, myrrh and spices, items which were considered valuable luxuries by the Ancient Egyptians, Phoenicians, Mycenaean and Babylonians.

According to most scholars, the ancient Kingdom of Punt and its inhabitants formed part of the ethno genesis of the Somali people. The ancient Puntites were a nation of people that had close relations with Pharaonic Egypt during the times of Pharaoh Sahure and Queen Hatshepsut. The pyramidal structures, temples and ancient houses of dressed stone littered around Somalia are said to date from this period. In the classical era, several ancient city-states such as Opone, Mosyllon and Malao that competed with the Sabaeans, Parthians and Axumites for the wealthy Indo-Greco-Roman trade also flourished in Somalia.

ancient arts
The Citadel of Gondershe, Somalia was an important city in the Medieval Ajuuraan Empire.

The birth of Islam on the opposite side of Somalia's Red Sea coast meant that Somali merchants, sailors and expatriates living in the Arabian Peninsula gradually came under the influence of the new religion through their converted Arab Muslim trading partners. With the migration of fleeing Muslim families from the Islamic world to Somalia in the early centuries of Islam and the peaceful conversion of the Somali population by Somali Muslim scholars in the following centuries, the ancient city-state eventually transformed into Islamic Mogadishu, Berbera, Zeila, Barawa and Merca, which were part of the Berberi civilization. The city of Mogadishu came to be known as the City of Islam, and controlled the East African gold trade for several centuries.

In the Middle Ages, several powerful Somali empires dominated the regional trade including the Ajuuraan State, which excelled in hydraulic engineering and fortress building, the Sultanate of Adal, whose general Ahmed Gurey was the first African commander in history to use cannon warfare on the continent during Adal's conquest of the Ethiopian Empire, and the Gobroon Dynasty, whose military dominance forced governors of the Omani empire north of the city of Lamu to pay tribute to the Somali Sultan Ahmed Yusuf.

In the late 19th century, after the Berlin conference had ended, European empires sailed with their armies to the Horn of Africa. The imperial clouds wavering over Somalia alarmed the Dervish leader Muhammad Abdullah Hassan, who gathered Somali soldiers from across the Horn of Africa and began one of the longest colonial resistance wars ever. The Dervish State successfully repulsed the British empire four times and forced it to retreat to the coastal region. As a result of its successes against the British, the Dervish State received support from the Ottoman and German empires. The Turks also named Hassan Emir of the Somali nation, and the Germans promised to officially recognize any territories the Dervishes were to acquire. After a quarter of a century of holding the British at bay, the Dervishes were finally defeated in 1920, when Britain for the first time in Africa used aeroplanes to bomb the Dervish capital of Taleex. As a result of this bombardment, former Dervish territories were turned into a protectorate of Britain. Italy similarly faced the same opposition from Somali Sultans and armies and did not acquire full control of parts of modern Somalia until the Fascist era in late 1927. This occupation lasted till 1941 and was replaced by a British military administration. The Union of the two regions in 1960 formed the Somali Democratic Republic that would actively pursue a Greater Somalia policy of uniting all of the Somali inhabited regions of the Horn of Africa.