From the 7th to the 10th century, Arab and Persian trading posts were established along the coast of present-day Somalia. Nomadic tribes occupied the interior, occasionally pushing into Ethiopian territory. In the 16th century, Turkish rule extended to the northern coast, and the sultans of Zanzibar gained control in the south.
After British occupation of Aden in 1839, the Somali coast became its source of food. The French established a coal-mining station in 1862 at the site of Djibouti, and the Italians planted a settlement in Eritrea. Egypt, which for a time claimed Turkish rights in the area, was succeeded by Britain. By 1920, a British and an Italian protectorate occupied what is now Somalia. The British ruled the entire area after 1941, with Italy returning in 1950 to serve as United Nations trustee for its former territory.
By 1960, Britain and Italy granted independence to their respective sectors, enabling the two to join as the Republic of Somalia on July 1, 1960. Somalia broke diplomatic relations with Britain in 1963 when the British granted the Somali-populated Northern Frontier District of Kenya to the Republic of Kenya.
On Oct. 15, 1969, President Abdi Rashid Ali Shermarke was assassinated and the army seized power. Maj. Gen. Mohamed Siad Barre, as president of a renamed Somali Democratic Republic, leaned heavily toward the USSR. In 1977, Somalia openly backed rebels in the easternmost area of Ethiopia, the Ogaden Desert, which had been seized by Ethiopia at the turn of the century. Somalia acknowledged defeat in an eight-month war against the Ethiopians that year, having lost much of its 32,000-man army and most of its tanks and planes. President Siad Barre fled the country in late Jan. 1991. His departure left Somalia in the hands of a number of clan-based guerrilla groups, none of which trusted each other