KABUL, Afghanistan (AP) -- Afghanistan's government signed a draft peace deal on Thursday with a designated "global terrorist" after lengthy negotiations that could pave the way for a similar accord with the Taliban, who have been waging war on Kabul for 15 years.
The deal with warlord Gulbuddin Hekmatyar is the country's first peace agreement since the Taliban launched their insurgency in 2001, after being driven from power in the wake of the 9/11 attacks on the United States.
It grants full political rights to his Hezb-i-Islami Gulbuddin party and obliges the Afghan authorities to work to have it removed from the United Nations' list of foreign terrorist organizations.
Hekmatyar himself was designated by the U.S. as a "global terrorist" in 2003. He was blacklisted at Washington's request by the U.N. the same year, and has similar status with the British government.
The agreement ends years of talks between Kabul and Hekmatyar, who is in his late 60s. It should enable him to return to Afghanistan after 20 years in exile --- he is believed to live in Pakistan --- as it includes provisions for his security at government expense.
The signing ceremony was broadcast live on television. The agreement was signed by the head of Kabul's High Peace Council, Ahmad Gilani, national security adviser Mohammad Hanif Atmar, and Hekmatyar's representative Amin Karim. Hekmatyar's son Habiburahman sat with an audience of officials.
To be formalized, the agreement must be signed by President Ashraf Ghani and Gulbuddin Hekamtyar; no timetable has been announced though Atmar said it would happen "as soon as possible."
The deal marks a victory of sorts for Ghani, who has been unable to bring peace to Afghanistan despite election promises and early efforts to forge a close diplomatic relationship with neighboring Pakistan. The failure of those efforts has seen Ghani reverse course in recent months --- he now openly accuses Pakistan of supporting and protecting the Taliban. Pakistan denies the accusations, though the Taliban's leadership councils are based in Quetta and other Pakistani cities.
Talks between Kabul and the Taliban, hosted by Pakistan and aimed at ending the war, broke down earlier this year.
With this peace deal, Ghani can demonstrate to the Taliban's leaders that his government is willing to make compromises for the sake of peace. The key points are the removal from international blacklists, immunity from prosecution for alleged war crimes, allowing unilateral political activity, and the release of prisoners.
"It proves peace is possible," Franz-Michael Mellbin, the European Union's special representative for Afghanistan, said of the agreement.
"The political space to say no to peace in Afghanistan is now virtually nonexistent," he told The Associated Press, adding that the deal "creates a new narrative that has been missing for many, many years."
The final deal is believed to be little changed from a draft agreed by Hekmatyar's representatives and the HPC in May, and seen by the AP. Finalizing the deal was held up by three demands from Hekmatyar that do not appear in the final draft, a senior official said. He spoke off the record as he was not authorized to comment publicly on the issue.
The contentious points were a demand that Afghanistan's insecurity be blamed "first and last" on the presence of foreign forces, a timetable for their withdrawal, and that he be granted a formal title as a savior of the country, he said.
The deal enjoys the support of the international community, which has a vital role to play in bringing peace to Afghanistan due to the blacklists that also feature senior Taliban figures.
Hekmatyar's mujahideen fighters have been largely pushed to the sidelines of Afghanistan's war and many of his armed supporters are believed to have joined the Taliban. The last known attack carried out by his militants was in 2013, when at least 15 people, including six American soldiers, were killed in central Kabul.
He is best known, however, for causing the deaths of possibly thousands of people during the 1990s civil war, when his forces rained rockets on Kabul in his fight with other warlords for control of the capital.