Somalia became and independent countryin 1960. For its earlier history . Faced with serious economic problems, the new nation relied heavily on foreign aid. Somali nationalism led to guerrilla warfare in Kenya and Ethiopia over border territory inhabited mainly by Somali nomads. In 1969 a group of leftist army officers led by Major General Mohammed Siad Barre seized power.

In 1977 Somalia invaded Ethiopia and seized most of the Ogaden region, which is peopled mainly by Somalis. The Ethiopians drove the Somali forces out in 1978.

Barre imposed a harsh dictatorship on Somalia. In 1991 Barre was overthrown by a coalition of rebel groups. No one regime replaced Barre's, as each rebel group set up its own government and the regions of Puntland and Somaliland broke away from the rest of Somalia. Somalia was soon engulfed in anarchy and hit by famine. United States forces in 1992 followed by United Nations (UN) troops in 1993 were sent to maintain order and to ensure the distribution of relief supplies. Later that year, however, rebel forces began fighting with the UN troops. More than 200,000 people were forced to evacuate their homes in southern Somalia in 1997 because excessive rain had caused floods in the area. About 2,000 people died as a result of the floods. Although a number of peace agreements were signed over the succeeding years, fighting continued and no new government was successfully formed. In 2000, a number of Somali leaders formed a transitional government for Somalia. However, the government failed to unite the country.

Another fledgling government for Somalia was formed in 2004 in Kenya after Somalia's main faction leaders signed an agreement with Somali politicians. As of February, 2006, the government was based in Baydhabo, Somalia. The power of the government was compromised in June, 2006, when a group of Islamists gained control of much of southern Somalia. However, the Somali government still held Baydhabo. Ethiopian forces joined the Somali government in December and fought the Islamic militia, regaining control of the south.