Representatives of the Taliban militia and the opposition Northern Alliance said they had agreed to form a joint executive, legislature and judiciary and to release 20 prisoners each as a gesture of goodwill. The announcement was made in Ashkhabad, the capital of the former Soviet republic of Turkmenistan.
Mohammad Younus Qanouni, who led the opposition delegation, said he was optimistic that the next round of talks - to be held in Afghanistan itself - would result in a permanent end to hostilities.
The leader of the Taliban delegation, Mullah Wakil Ahmed Muttawakil, said that a lasting ceasefire would automatically follow the establishment of a shared power structure. "When we agree on the details and personnel of the government then we can agree to have a ceasefire," he said.
The agreement came as a surprise. Only last month the two sides were refusing even to talk to each other. Lengthy "talks about talks" broke up acrimoniously last year and were followed by some of the fiercest battles seen in Afghanistan for many years.
"It is very strange and very sudden," an aid worker said yesterday in Islamabad, the Pakistani capital.
"It seems to go against everything the Taliban has stood for since they started."
The Taliban have conquered nearly 90 per cent of Afghanistan in a five- year campaign and until now they had always seemed determined to impose their strict version of Islamic law on the entire country. Senior Taliban officials - largely drawn from the majority Sunni Muslim Pathan tribes - have repeatedly denounced the opposition, who are drawn from the country's religious and ethnic minorities, as "brigands and criminals".
Throughout the winter there has been fierce fighting as troops from the Northern Alliance, led by Ahmed Shah Massoud, the former defence minister and a hero of the war against the Soviet Union, have tried to win back ground lost to Taliban offensives last year.
The distrust between the two sides may yet sink the latest hopes for peace. In the five years since the Taliban began their campaigns, both sides have committed horrific human rights abuses.
Two years ago it was discovered that commanders from the Northern Alliance had killed thousands of Taliban prisoners by throwing them down wells. Last year the Taliban massacred as many as 5,000 Shia Muslims when they captured the key northern city of Mazar-e-Sharif.
Much of Afghanistan has been devastated by 20 years of fighting. Mines cover the country's scarce agricultural land.The fighting has severely disrupted food distribution, causing severe local famines.
At the weekend the first United Nations personnel returned to Afghanistan since their evacuation last August, following the American missile strikes against targets linked to the alleged terrorist Osama bin Laden. In spite of the good news, experienced Afghanistan-watchers warned against euphoria. "We have been here many, many times before," said one Pakistan-based diplomat.
Afghanistan's 20 Years Of Bloodshed
1979: Moscow, scared by rising fundamentalism, invades Afghanistan to support its puppet regime.
1989: After suffering 30,000 casualties, the Russians withdraw. No one knows how many Afghans died but the total could be close to half a million.
1992: Kabul falls to the Muslim Mujahedin, defeating the regime supported by Moscow.
1992-95: Within days, various factions are fighting each other. Over the next three years much of Kabul is destroyed. Anarchy reigns as commanders set themselves up as warlords.
1994: The Taliban, a new movement devoted to establishing an Islamic state, sweep through the country.
1996: The Taliban - aided by friends in Pakistan and Saudi Arabia - hoist their flag over Kabul.
1998: Taliban capture the key city of Mazar-e-Sharif. The opposition falls apart, leaving the Taliban in control of almost 90 per cent of the country.Reuse content