With its high literacy rate and traditional mercantile culture, Lebanon has traditionally been an important commercial hub for the Middle East.
It has also often been at the centre of Middle Eastern conflicts, despite its small size, because of its borders with Syria and Israel and its uniquely complex communal make-up.
Shia Muslims, Sunni Muslims, Christians and Druze are the main population groups in a country that has been a refuge for the region's minorities for centuries.
After the fall of the Ottoman Empire, the League of Nations put Lebanon under a French mandate until it declared independence in the Second World War.
A 1943 unwritten agreement divided parliamentary seats along communal lines as defined in the 1932 census, when the country had a Christian majority. This principle was later extended to other government institutions, so that the president is a Maronite Christian, the prime minister a Sunni and the speaker of parliament a Shia.
At a glance
- Conflicts: Civil war ended in 1990 but Lebanon was embroiled in war with Israel in 2006 over Hezbollah. Syrian civil war has spilled over border
- Politics: Governments remain fragile, and increasingly at the mercy of the Syrian situation
- International: UN force in the south polices a Israeli-Hezbollah ceasefire; Syria overshadows hopes for peace
Country profiles compiled by BBC Monitoring
No census has been taken since 1932, and Muslim groups have demanded that representation should reflect their increased proportion in the population.
This communal tension has been at the heart of most internal conflict in Lebanon, and neighbouring states have used it as a pretext to intervene.
Lebanon has also seen several large influxes of Palestinian refugees. They and their descendants make up as much as a tenth of the country's population, and are almost all housed in shanty towns and enjoy few legal rights. Their presence, status and actions have been major sources of discord.
Civil war, foreign intervention
From 1975 until the early 1990s Lebanon endured a civil war in which regional players - in particular Israel, Syria and the Palestine Liberation Organisation - used the country as a battleground for their own conflicts.
Syrian troops moved in shortly after the war started. Israeli troops invaded in 1978 and again in 1982, before pulling back to a self-declared "security zone" in the south from which they withdrew in May 2000.
Syria continued to exert considerable political clout in Lebanon even after the withdrawal of its troops in 2005 ended a 29-year military presence.
The withdrawal followed the assassination in Beirut of former prime minister Rafik Hariri. Lebanese opposition groups accused Syria over the killing, and huge pro- and anti-Syria rallies in Beirut triggered the fall of the government and the Syrian pullout.
- March 14 - Pro-western Sunni-based alliance named after mass demonstrations that followed killing of ex-premier Rafik Hariri
- Hezbollah - Pro-Syrian Shia military/political movement that fought Israel in the 2006 war. Leads alliance of Shia Amal militia and Christian Free Patriotic Movement
The UN has demanded the dismantling of all armed groups in Lebanon, including Palestinian militias and the military wing of Hezbollah, which controls much of southern Lebanon.
When the Hezbollah militia seized two Israeli soldiers in a raid in July 2006, Israel responded with a 34-day military offensive and a blockade that wrecked post-civil-war stability.
A year after neighbouring Syria began its descent into civil war in 2011, deadly clashes between Sunni Muslims and Alawites in Tripoli and Beirut raised fears that the conflict was beginning to spill over the border and that Lebanon's already fragile political truce could once more collapse into sectarian strife.
The massive influx of people fleeing the Syrian conflict - by April 2014, Syrian refugees were estimated to make up around a quarter of the population - has placed a severe strain on the country's resources. In March 2014, the Lebanese foreign minister warned that the refugee crisis was threatening his country's very existence.
Before the Syrian civil war erupted, there were signs that the revival of Lebanon's tourism industry might lead the way to economic recovery. In 2010, shortly before the conflict began, tourism accounted for a fifth of Lebanon's economic output. However, the fighting in Syria and the associated resurgence of sectarian tensions in Lebanon have severely jolted the country's tourism industry and dented hopes of a return to the cosmopolitan prosperity of the 1950s and 1960s.