A chronology of key events:
The Horn of Africa has been home to Somalis since ancient times.
13th-17th centuries - Ajuran Sultanate dominates much of the Horn of Africa before collapsing into rival regional sultanates.
1875 - Egypt occupies towns on Somali coast and parts of the interior.
1860s - France acquires foothold on the Somali coast, later to become Djibouti.
1887 - Britain proclaims protectorate over Somaliland.
1888 - Anglo-French agreement defines boundary between Somali possessions of the two countries.
1889 - Italy sets up a protectorate in central Somalia, later consolidated with territory in the south ceded by the sultan of Zanzibar.
1925 - Territory east of the Jubba river detached from Kenya to become the westernmost part of the Italian protectorate.
1936 - Italian Somaliland combined with Somali-speaking parts of Ethiopia to form a province of Italian East Africa.
1940 - Italians occupy British Somaliland.
1941 - British occupy Italian Somalia.
1950 - Italian Somaliland becomes a UN trust territory under Italian control.
1956 - Italian Somaliland renamed Somalia and granted internal autonomy.
1960 - British and Italian parts of Somalia become independent, merge and form the United Republic of Somalia; Aden Abdullah Osman Daar elected president.
1963 - Border dispute with Kenya; diplomatic relations with Britain broken until 1968.
1964 - Border dispute with Ethiopia erupts into hostilities.
1967 - Abdi Rashid Ali Shermarke beats Aden Abdullah Osman Daar in elections for president.
Drought and war
1969 - Muhammad Siad Barre assumes power in coup after Shermarke is assassinated.
1970 - Barre declares Somalia a socialist state and nationalises most of the economy.
1974 - Somalia joins the Arab League.
1974-75 - Severe drought causes widespread starvation.
1977 - Somalia invades the Somali-inhabited Ogaden region of Ethiopia.
1978 - Somali forces pushed out of Ogaden with the help of Soviet advisers and Cuban troops. Barre expels Soviet advisers and gains support of United States.
1981 - Opposition to Barre's regime begins to emerge after he excludes members of the Mijertyn and Isaq clans from government positions, which are filled with people from his own Marehan clan.
1988 - Peace accord with Ethiopia.
1991 - Mohamed Siad Barre is ousted. Power struggle between clan warlords kills or wounds thousands of civilians.
Somaliland breaks away
1991 - Former British protectorate of Somaliland declares unilateral independence.
1992 - US Marines land near Mogadishu ahead of a UN peacekeeping force sent to restore order and safeguard relief supplies.
1993 - US Army Rangers are killed when Somali militias shoot down two US helicopters in Mogadishu and a battle ensues. Hundreds of Somalis die. US mission formally ends in March 1994.
1995 - UN peacekeepers leave, having failed to achieve their mission.
1996 August - Warlord Mohamed Farah Aideed dies of wounds and is succeeded by his son, Hussein.
1998 - Puntland region declares autonomy.
2000 August - Clan leaders and senior figures meeting in Djibouti elect Abdulkassim Salat Hassan president of Somalia.
2000 October - Hassan and his newly-appointed prime minister, Ali Khalif Gelayadh, arrive in Mogadishu to heroes' welcomes. Gelayadh announces his government, the first in the country since 1991.
2001 April - Somali warlords, backed by Ethiopia, decline to support transitional administration.
2004 August - In 14th attempt since 1991 to restore central government, a new transitional parliament inaugurated at ceremony in Kenya. In October the body elects Abdullahi Yusuf as president.
2004 December - Tsunami off Indonesia displaces 10,000s on Somali coast.
2005 February-June - Somali government begins returning home from exile in Kenya, but there are bitter divisions over where in Somalia the new parliament should sit.
2005 November - Prime Minister Ali Mohammed Ghedi survives an assassination attempt in Mogadishu.
2006 February - Transitional parliament meets in central town of Baidoa for the first time since it was formed in 2004.
2006 March-May - Scores of people are killed and hundreds are injured during fierce fighting between rival militias in Mogadishu. Worst violence in almost decade.
2006 June-July - Militias loyal to the Union of Islamic Courts take Mogadishu and other parts of south after defeating clan warlords.
Ethiopian troops enter Somalia.
2006 July-August - Mogadishu's air and seaports are re-opened for the first time since 1995.
2006 September - Transitional government and Islamic Courts begin peace talks in Khartoum.
Somalia's first known suicide bombing targets President Yusuf outside parliament in Baidoa.
2006 December - Ethiopian and transitional government put Islamists to flight, capturing Mogadishu.
2007 January - Islamists abandon their last stronghold, the southern port of Kismayo.
President Abdullahi Yusuf enters Mogadishu for the first time since taking office in 2004.
Air strikes in south against al-Qaeda figures are first direct US military intervention in Somalia since 1993.
2007 March - African Union troops land in Mogadishu amid pitched battles between Islamist insurgents and government forces backed by Ethiopian troops, after UN Security Council authorised six-month peacekeeping mission.
2008 May - The UN Security Council allows countries to send warships to Somalia's territorial waters to tackle pirates.
2009 January - Ethiopia completes withdrawal of troops, announced the previous year, and Al-Shabab capture Baidoa, formerly a key government stronghold.
Meeting in Djibouti, parliament elects moderate Islamist Sheikh Sharif Sheikh Ahmed president, extends transitional government's mandate for another two years.
2009 May - Islamist insurgents launch onslaught on Mogadishu and advance in the south.
2009 October - Al-Shabab recaptures the southern port of Kismayo after defeating the rival Hizbul-Islam militia.
2010-12 - Famine kills almost 260,000, the UN says.
2010 January - UN World Food Programme withdraws from Al-Shabab areas of southern Somalia after threats to lives of its staff.
2010 February - Al-Shabab formally declares alliance with al-Qaeda, begins to concentrate troops for a major offensive to capture the capital.
2011 January - Pirate attacks on ships worldwide hit seven-year high in 2010, with Somali pirates accounting for 49 of 52 ships seized.
2011 July - UN formally declares famine in three regions of Somalia. Al-Shabab partially lifts ban on foreign aid agencies in south, and UN airlifts its first aid consignment in five years to Mogadishu.
Al-Shabab pulls out of Mogadishu in what it calls "tactical move".
2011 October - Kenyan troops enter Somalia to attack rebels they accuse of being behind several kidnappings of foreigners on Kenyan soil.
American military begins flying drone aircraft from a base in Ethiopia, Ethiopian troops return to central town of Guriel.
2012 February-May - Al-Shabab loses key towsn of Baidoa and Afgoye to Kenyan, African Union and Somali government forces.
New parliament, president
2012 August - Somalia's first formal parliament in more than 20 years is sworn in at Mogadishu airport, ending eight-year transitional period. Pro-government forces capture the port of Merca south of Mogadishu from Al-Shabab.
2012 September - MPs in Mogadishu elect academic and civic activist Hassan Sheikh Mohamud president over the incumbent Sharif Sheikh Ahmed. First presidential election in Somalia since 1967.
2012 October - African Union and government forces recapture Kismayo, the last major city held by Al-Shabab and the country's second-largest port, and the town of Wanla Weyn northwest of Mogadishu.
2013 January - US recognises Somalia's government for the first time since 1991.
2013 June - Veteran Al-Shabab leader Sheikh Hassan Dahir Aweys is taken into custody by government troops after he is ousted by more extreme Al-Shabab figure Ahmed Abdi Godane.
Spike in violence with various attacks by Al-Shabab, including on presidential palace and UN compound in Mogadishu.
2013 September - International donors promise 2.4 billion dollars in reconstruction aid in three-year ''New Deal''.
Shabab attacks Kenya
2013 September - Al-Shabab seize shopping centre and kill 60 people in Kenyan capital Nairobi, saying it is retaliation for Kenya's military involvement in Somalia.
2014 May - Al-Shabab says it carried out a bomb attack on a restaurant in Djibouti, saying the country is used as a launch pad to strike Muslims.
2014 June - Al-Shabab claims two attacks on the Kenyan coast which kill more than 60, saying operations against Kenya would continue.
2014 September - Al-Shabab leader Ahmed Abdi Godane killed in US drone strike. Government offers 2 million dollar bounty for his successor, Ahmad Omar.
2014 November - Government launches country's first postal service in more than two decades. Mogadishu's first ever cash withdrawal machine installed in a hotel.
2014 November-December - Al Shabab carry out mass killings in north-east Kenya, including on a bus and a camp of quarry workers.
2015 April - Al-Shabab claim responsibility for killing 148 people, mainly Christian students, at Garissa University College in northern Kenya.Kenya carries out air raids on Al-Shabab bases in Somalia in retaliation.
2015 May - US Secretary of State John Kerry pays brief visit to Mogadishu, the first officeholder to do so, a few weeks after Al-Shabab raid government quarter of the city and kill 17 people.
2016 February - African Union leaders agree on need for more funding and support for their military presence in Somalia after weeks of increased Al-Shabab attacks on public spaces and pro-government troops. Government and African Union troops recapture southern port of Merca that Al-Shabab briefly seized.
2016 November - Leaders of two Somali regions, Puntland and Galmudug, agree to respect a ceasefire in the disputed city of Galkayo. Fighting in the city reportedly displaced 90,000.
2017 February - Parliament elects former prime minister Mohamed Abdullahi Mohamed, known as Farmajo, as president. Al-Shabab threatens to target anyone collaborating with him.
2017 March - Pirates seize tanker off coast of Puntland in the first hijacking of a large vessel in the region since 2012.
2017 May - President Mohamed at London conference calls for lifting of arms embargo to help defeat al-Shabab. UN Secretary General Antonio Guterres says conditions are now in place in Somalia for it to become a success story.
2017 October - Double truck bombing kills 350 people in Mogadishu. Al-Shabaab is prime suspect.