Two decades of fighting led up to an agreement in principle Sunday among Afghan factions to a peace deal that would create a coalition government.
In April 1978, Afghanistan's first Communist ruler, backed by the former Soviet Union, took power in a coup that toppled the ruling monarchy.
The Soviets invaded a year later to support the Communist regime against the country's traditional Muslim tribal leaders. After a decade of tough guerrilla fighting, Moscow withdrew.
The Islamic factions that fought Soviet troops then began battling each other for power. In the latter part of 1994, a militant group called the Taliban - the plural of talib, or "religious seeker" - emerged. It would go on to control some 90 percent of Afghanistan, meeting tough resistance in the north, long a stronghold of tribal leaders.
The two sides' major differences are ethnic: The Taliban represents the country's Pushto-speaking majority; the northern alliance consists of non-Pushto-speaking groups ethnically similar to people of former Soviet central Asian states such as Turkmenistan and Uzbekistan.
The Taliban's strict brand of Islamic rule - especially restrictive regarding women and girls, and which uses execution, beatings, and stonings as punitive measures - has brought criticism from the international community.
But citing a great need among Afghans for humanitarian aid, the UN returned this week, ending a boycott that began in August after a UN worker was killed in Kabul, apparently in retaliation for US airstrikes on alleged terrorist camps run by Saudi dissident Osama bin Laden.