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.
Since the fall of the Taliban administration in 2001, adherents of the hard-line Islamic movement have re-grouped.
It is now a resurgent force, particularly in the south and east, and the Afghan government has struggled to extend its authority beyond the capital and to forge national unity.
Its strategic position sandwiched between the Middle East, Central Asia and the Indian subcontinent along the ancient "Silk Route" means that Afghanistan has long been fought over - despite its rugged and forbidding terrain.
It was at the centre of the so-called "Great Game" in the 19th century when Imperial Russia and the British Empire in India vied for influence.
And it became a key Cold War battleground after thousands of Soviet troops intervened in 1979 to prop up a pro-communist regime, leading to a major confrontation that drew in the US and Afghanistan's neighbours.
But the outside world eventually lost interest after the withdrawal of Soviet forces, while the country's protracted civil war dragged on.
The emergence of the Taliban - originally a group of Islamic scholars - brought at least a measure of stability after nearly two decades of conflict.
But their extreme version of Islam attracted widespread criticism.
The Taliban - drawn from the largest ethnic group, the Pashtuns - were opposed by an alliance of factions drawn mainly from Afghanistan's other communities and based in the north.
In control of about 90% of Afghanistan until late 2001, the Taliban were recognised as the legitimate government by only three countries.
They were at loggerheads with the international community over the presence on their soil of Osama bin Laden, accused by the US of masterminding the bombing of their embassies in Africa in 1998 and the attacks on the US on 11 September 2001.
After the Taliban's refusal to hand over bin Laden, the US initiated aerial attacks in October 2001, paving the way for opposition groups to drive them from power.
Infighting between local commanders over power and territory became a feature of the post-Taliban period. The authorities in Kabul have been able to exert little control beyond the capital and militant violence has continued.
Predictions of the Taliban's demise after the adoption of a new Afghan constitution in 2004 proved to be premature - the hard-line group came back with a vengeance and violence has risen steadily to levels not seen since the fall of the Taliban in 2001.
The Afghan conflict replaced Iraq as the main policy headache for the US and their allies, and in March 2009 US President Barack Obama unveiled a new American strategy for Afghanistan and Pakistan to combat what he called an increasingly perilous situation.
In December, this was followed by an order boosting US troops numbers by 30,000, as well as a pledge to begin withdrawing forces by 2011.
Meanwhile, tentative steps towards a negotiated peace agreement were made in 2012, when the Taliban announced they had agreed to open an office in Dubai for talks with US officials.
Afghanistan's drugs industry was reported to make up more than half of the economy by 2007, having boomed since the fall of the Taliban. The country supplies over 90% of the world's opium, the raw ingredient of heroin.
International bodies and governments say the drugs trade is helping to fuel the Taliban insurgency, which is estimated to receive up to US$100m a year from the trade.
The UN Office on Drugs and Crime has called on Afghanistan to target the major traffickers and corrupt government officials, who it says operate with impunity in the country.
* Full name: Islamic Republic of Afghanistan
* Population: 29.1 million (UN, 2010)
* Capital and largest city: Kabul
* Area: 652,225 sq km (251,773 sq miles)
* Major languages: Dari, Pashto
* Major religion: Islam
* Life expectancy: 49 years (men), 49 years (women) (UN)
* Monetary unit: Afghani
* Main exports: Fruit and nuts, carpets, wool, opium
* GNI per capita: US $370 (World Bank, 2009)
* Internet domain: .af
* International dialling code: +93
President: Hamid Karzai
Hamid Karzai, in power since Taliban rule was ended in 2001, won a second five-year term as president in an August 2009 election widely criticised both at home and abroad as being marred by widespread fraud.
Initial vote tallies for the first round looked set to give Mr Karzai an outright win, but the UN-backed electoral complaints authority discounted hundreds of thousands of votes as fraudulent, cutting his share of the vote to under 50%.
This result would have forced a second round, but Mr Karzai was declared the winner when the second-placed candidate, former Foreign Minister Abdullah Abdullah, withdrew from the race, claiming not enough had been done to prevent further fraud.
Mr Karzai was finally sworn in for a second term as president in November 2009.
In his inauguration speech, he said was determined to tackle the problem of corruption, and would work to bolster the strength of Afghan security forces and reduce the role of international forces.
Mr Karzai again ran into difficulties in January 2010, when parliament rejected most of his new cabinet line-up, much of it reputedly chosen to please the president's allies among the powerful but unpopular former warlords.
Hamid Karzai was initially put in charge of the provisional administration set up when the Taliban were driven from power in 2001, and won Afghanistan's first direct presidential elections in October 2004.
He faced the tough challenges of forging national unity, disarming regional militias and tackling drug production.
Mr Karzai, a Pashtun leader, was seen an effective player on the world stage and initially he enjoyed strong backing from his Western allies. In 2002 persuaded international donors to pledge $4bn to help rebuild his country.
However, the president's relations with the West cooled significantly towards the end of his second term, amid allegations of widespread corruption in his administration.
Mr Karzai has defended the presence of international troops in Afghanistan, but has been critical of coalition air strikes that have caused heavy civilian casualties.
From 2008, Mr Karzai held secret talks with the main factions of the Taliban in a bid to achieve some kind of national reconciliation - with the knowledge and cooperation of the US. But in October 2011, he said there was no point in continuing to talk to the Taliban. Instead, he said, his government should be talking to Pakistan - in his view, the power behind the Taliban.
Born in the southern Afghan town of Kandahar in 1957, Hamid Karzai studied in India and France. Exiled in Pakistan for much of the Soviet occupation and during Taliban rule, he was chosen as post-Taliban Afghanistan's interim leader in late 2001.
Afghanistan's constitution, which was adopted in 2004 by an assembly of tribal representatives, envisages a powerful presidency and defines Afghanistan as an Islamic republic, where men and women enjoy equal status before the law.
From : BBC News