Landlocked and mountainous, Afghanistan has suffered from such chronic instability and conflict during its modern history that its economy and infrastructure are in ruins, and many of its people are refugees.
The Taliban, who imposed strict Islamic rule following a devastating civil war, were ousted by a US-led invasion in 2001 but have recently been making a comeback.
The internationally-recognised government set up following the adoption of a new constitution in 2004 has struggled to extend its authority beyond the capital and to forge national unity.
Nato-led foreign combat troops had the main responsibility for maintaining security after 2001, and the formal end of Nato's combat mission in December 2014 was followed by an upsurge in Taliban activity.
President: Ashraf Ghani
President Ghani, right, heads a unity government along with former rival and now chief executive Abdullah Abdullah, left. He was sworn in as president in September 2014.
He replaced Hamid Karzai, who led the country for twelve years after the Taliban were overthrown in 2001.
There is a lively private media scene, which includes dozens of TV networks and more than 170 radio stations.
Reporters Without Borders says that journalists and the media are under constant threat from militants, warlords and corrupt officials.
Internet access can be expensive. Facebook tends to be used by younger Afghans and the political elite.
Some key dates in Afghanistan's history:
1979 - Soviet Army invades and props up communist government. More than a million people die in the ensuing war.
1989 - Last Soviet troops leave. US- and Pakistan-backed mujahideen push to overthrow Soviet-installed Afghan ruler Najibullah triggers devastating civil war.
1996 - Taliban seize control of Kabul and impose hard-line version of Islam.
2001 - US intervenes militarily following September 11 attacks on the United States. Taliban are ousted from Kabul and Hamid Karzai becomes head of an interim power-sharing government.
2002 - Nato assumes responsibility for maintaining security in Afghanistan.
2004 - Loya Jirga adopts new constitution which provides for strong presidency. Hamid Karzai is elected president.
2014 - Ashraf Ghani elected president. NATO formally ends its combat mission in Afghanistan, handing over to Afghan forces, who face a growing insurgency.