Years of fighting between rival warlords and an inability to deal with famine and disease have led to the deaths of up to one million people.
Comprised of a former British protectorate and an Italian colony, Somalia was created in 1960 when the two territories merged. Since then its development has been slow. Relations with neighbours have been soured by its territorial claims on Somali-inhabited areas of Ethiopia, Kenya and Djibouti.
In 1970 Mr Barre proclaimed a socialist state, paving the way for close relations with the USSR. In 1977, with the help of Soviet arms, Somalia attempted to seize the Ogaden region of Ethiopia, but was defeated thanks to Soviet and Cuban backing for Ethiopia, which had turned Marxist.
AT A GLANCE
Scene of arguably Africa's worst humanitarian crisis: a third of the population is dependant on food aid
No effective government since 1991
A UN-backed transitional government emerged in 2004
The self-proclaimed state of Somaliland and the region of Puntland run their own affairs
In 1991 President Barre was overthrown by opposing clans. But they failed to agree on a replacement and plunged the country into lawlessness and clan warfare.
In 2000 clan elders and other senior figures appointed Abdulkassim Salat Hassan president at a conference in Djibouti. A transitional government was set up, with the aim of reconciling warring militias.
But as its mandate drew to a close, the administration had made little progress in uniting the country.
In 2004, after protracted talks in Kenya, the main warlords and politicians signed a deal to set up a new parliament, which later appointed a president.
The fledgling administration, the 14th attempt to establish a government since 1991, has faced a formidable task in bringing reconciliation to a country divided into clan fiefdoms.
Its authority was further compromised in 2006 by the rise of Islamists who gained control of much of the south, including the capital, after their militias kicked out the warlords who had ruled the roost for 15 years.
With the backing of Ethiopian troops, forces loyal to the interim administration seized control from the Islamists at the end of 2006.
Islamist insurgents - including the Al-Shabab group, which the US accuses of links to al-Qaeda - fought back against the government and Ethiopian forces, regaining control of most of southern Somalia by late 2008.
Ethiopia pulled its troops out in January 2009. Soon after, fighters from the Al-Shabab militia took control of Baidoa, formerly a key stronghold of the transitional government.
Somalia's parliament met in neighbouring Djibouti in late January and swore in 149 new members from the main opposition movement, the Alliance for the Re-Liberation of Somalia.
The parliament also extended the mandate of the transitional federal government for another two years, and installed moderate Islamist Sheikh Sharif Sheikh Ahmad as the new president.
However, the government's military position weakened further, and in May 2009, Al-Shabab and another radical militia launched an attack on Mogadishu, prompting President Ahmad to appeal for help from abroad.
The long-standing absence of authority in the country has led to Somali pirates becoming a major threat to international shipping in the area, and has prompted Nato to take the lead in an anti-piracy operation.
After the collapse of the Siad Barre regime in 1991, the north-west part of Somalia unilaterally declared itself the independent Republic of Somaliland. The territory, whose independence is not recognised by international bodies, has enjoyed relative stability.
- Population: 9.1 million (UN, 2009)
- Capital: Mogadishu
- Area: 637,657sq km (246,201 sq miles)
- Major languages: Somali, Arabic, Italian, English
- Major religion: Islam
- Life expectancy: 48 years (men), 51 years (women)
- Monetary unit: 1 Somali shilling = 100 cents
- Main exports: Livestock, bananas, hides, fish
- GNI per capita: n/a
- Internet domain: .so
- International dialling code: +252
President: Sheikh Sharif Sheikh Ahmad
A moderate Islamist, Sheikh Sharif Sheikh Ahmad was elected president of Somalia's fragile transitional government in January 2009, replacing President Abdullahi Yusuf Ahmed, who had stepped down a month earlier.
Sheikh Sharif has promised to bring peace and unity to Somalia
Mr Ahmed was elected by parliament, which was sitting in neighbouring Djibouti to avoid the violence back home. He comfortably won through against several other contenders, among them the then-Prime Minister, Nur Hassan Hussein.
At his swearing-in, Mr Ahmed promised to bring peace and unity to Somalia, and to work with anyone sharing the same aim.
Only days earlier, Ethiopian troops had completed their pullout from Somalia. Mr Ahmed was chairman of the Islamic Courts' Union (ICU) that wrested control of Mogadishu from its feuding warlords in 2006, before the Ethiopian army invaded to remove it of from power.
After the Ethiopian incursion, he escaped to Kenya, before joining the insurgent Islamist-led Alliance for the Re-liberation of Somalia (ARS).
He later broke with the hardline ARS leader, Sheikh Hassan Dahir Awes, to set up a moderate breakaway faction based in Djibouti.
Mr Ahmed, in his 40s at the time of his election, studied in Libya and Sudan, before becoming a secondary school teacher in Mogadishu, where he joined the ICU. He is a member of the Abgaal clan.
His predecessor, Abdullahi Yusuf Ahmed, resigned after parliament sided with Prime Minister Nur Hassan, whom he had tried to sack over a dispute about how to deal with rebel Islamist militants in control of much of southern Somalia.
Mr Yusuf - an ally of Ethiopia and a foe of the Islamists - had been chosen as president by the transitional parliament set up in 2004 after years of peace talks.
He was once seen as the strongman Somalia needed, but his reliance on Ethiopian military assistance was deeply unpopular with many Somalis and undermined efforts to impose the transitional government's authority on the country as a whole.
Prime minister: Omar Abdirashid Ali Sharmarke
Mr Sharmarke, who became prime minister in February 2009, is widely seen as a bridge between Islamists within the government and the international community.
Omar Abdirashid Ali Sharmarke has worked for the UN in Darfur
His father was Somalia's second civilian president, who was killed in 1969 ahead of the military coup that brought Siad Barre to power.
Mr Sharmarke is from the Darod clan, ensuring the country's three major clans are represented in the country's struggling leadership.
Raised in the US and Canada, he is also said to enjoy widespread support from parliamentarians and Somalis living at home and abroad.
He has worked for the United Nations in Darfur and was most recently Somalia's ambassador-designate to Washington.
Somalia's disintegration is reflected in its media, which tends to be fragmented and often partisan.
Broadcasters and journalists operate in an atmosphere which is hostile to free expression, and often dangerous. In 2008, Reporters Without Borders described Somalia as "Africa's deadliest country for journalists".
Journalists defy danger to serve their audiences
Nevertheless, diverse and increasingly professional media outlets have emerged in recent years - in particular, FM radio stations with no explicit factional links.
The TV and press sectors are weak and radio is the dominant medium. There are around 20 radio stations, but no national, domestic broadcaster. Many listeners tune to Somali-language media based abroad, in particular the BBC Somali service.
The Somali diaspora - in the West, the Gulf states and elsewhere - sustains a rich internet presence. But domestic web access is hampered by practicalities such as limited access to mains electricity.
In secessionist Somaliland and Puntland the authorities maintain a tight hold on broadcasting.
- Qaran - Mogadishu
- Xog-Ogaal - Mogadishu
- Codka Xoriyadda - Mogadishu
- Ayaamaha - Mogadishu
- Jamhuuriya - Somaliland
- Mandeeq - Somaliland
- Somaliland Times - Somaliland, English-language weekly
- Somali Telemedia Network (STN) - private, rebroadcasts Qatar-based Al-Jazeera TV and CNN
- HornAfrik TV - private, rebroadcasts Al-Jazeera, CNN
- Somaliland National TV (SLNTV) - owned by Somaliland government
- Somali Broadcasting Corporation (SBC) - private, Puntland
- Radio Mogadishu - FM station operated by transitional government, coverage limited to the capital
- Radio HornAfrik - popular private FM station based in Mogadishu, rebroadcasts BBC
- Radio Shabelle - private FM station in Mogadishu, Marka
- Radio Banaadir - private, Mogadishu-based FM station
- Holy Koran Radio - private, Mogadishu FM station
- Radio Simba - private, Mogadishu
- Radio Hargeisa - owned by Somaliland government, via FM and shortwave
- Radio Galkayo - Puntland
- Voice of Peace - Puntland
SBC Radio - private, Puntland
Mauritania Mauritius Morocco Mozambique Namibia Niger Nigeria Republic-of-congo Rwanda Sao-tome-and-principe Senegal Seychelles Sierra-leone Somalia South-africa Sudan Swaziland Tanzania The-gambia Togo Tunisia Uganda zambia Zimbabwe Australia Brunei Burma Cambodia China East-timor Fiji Indonesia Japan Kazakhstan Kiribati Kyrgyzstan Laos Malaysia Marshall-islands Micronesia Mongolia Nauru New-zealand North-korea Palau Papua-new-guinea Samoa Singapore Solomon-islands South-korea Taiwan Tajikistan Thailand The-philippines Tonga Turkmenistan Tuvalu Uzbekistan Vanuatu Vietnam Antigua-and-barbuda Argentina Bahamas Barbados Belize Bolivia Brazil Canada Chile Colombia Costa-rica Cuba Dominica Dominican-republic Ecuador El-salvador Grenada Guatemala GuyanaHaiti Honduras Jamaica Mexico Nicaragua Panama Paraguay Peru St-kitts-and-nevis St-lucia St-vincent-and-the-grenadines Suriname Trinidad-and-tobago United-states-of-america Uruguay Venezuela Albania Andorra Armenia Austria Azerbaijan Belarus Belgium Bosnia-hercegovina Bulgaria Croatia Cyprus Czech-republic Denmark Estonia Finland France Georgia Germany Greece Hungary Iceland Ireland Italy Latvia Liechtenstein Lithuania Luxembourg Macedonia Malta Moldova Monaco Montenegro Norway Poland Portugal Russia San-marino Serbia Slovakia Slovenia Spain Sweden Switzerland The-netherlands Turkey Ukraine United-kingdom Vatican Algeria Egypt Iran Iraq Israel-and-palestinian-territories Jordan Kuwait Lebanon Libya Mauritania Oman Saudi-arabia Sudan Syria Tunisia United-arab-emirates Yemen Afghanistan Bangladesh Bhutan India Nepal Pakistan Sri-Lanka The-Maldives