The agreement with Gulbuddin Hekmetyar is a symbolic win for the Kabul government, but it has angered some Afghans who believe it will grant the former warlord impunity from accusations of rights abuses and war crimes.
The Afghan government has signed a peace agreement with the leader of the nation's second-largest armed opposition movement.
Thursday's deal, signed by members of the High Peace Council — formed in 2010 to negotiate with the opposition — and representatives of the armed wing of the Hezb-e Islami group marks a symbolic win for Ashraf Ghani, the Afghan president.
The agreement will also be signed by Ghani and Gulbuddin Hekmetyar, the leader of the armed wing of Hezb-e Islami, at a later date.
It will see Hekmetyar granted amnesty against prosecution for abuses and war crimes he is accused of carrying out during the Afghan Civil War of the 1990s.
"This agreement is signed after two years of negotiations between the High Peace Council, the leadership of the Afghan Government and the Hezb-e Islami," Habiba Sorabi, an HPC deputy, said at the ceremony in Afghanistan's capital, Kabul.
In a tweet, Abdullah Abdullah, chief executive of the national unity government, invited "[The] #Taliban to pick peace over violence and secure a better future for themselves."
As we sign peace agreement with Hezb-e-Islami, we invite #Taliban to pick peace over violence and secure a better future for themselves.— Dr. Abdullah (@afgexecutive) September 22, 2016
Speaking at the ceremony, Hanif Atmar, President Ghani's chief national security advisor, lauded the pact, saying, "peace agreements in any nation are never easy," but that it was a necessary step towards further peace in the nation.
Warlords who joined civil government some years earlier than Hekmatyar seem to be upset with the return of an old rival.— Modaser Islami (@mmodaser) September 22, 2016
Atmar also called on the Taliban to free themselves from Pakistan and "the control of foreigners." Afghans have long accused their southern neighbour of aiding and abetting the group.
During the Soviet occupation of Afghanistan, Islamabad joined Washington and London in their financial and military support of Hekmetyar and other mujahideen commanders.
With Hekmetyar's group not having claimed an attack on Afghan or international forces in several years, several people have questioned the symbolic value of peace with Hezb-e Islami when the Taliban continues to make gains in the country.
The agreement was greeted largely positively outside the country.
"This agreement demonstrates the preparedness of Afghanistan's government to seek peace with armed anti-government elements. A credible peace process must remain owned and driven by Afghans," a statement by the United Nations Assistance Mission in Afghanistan read.
The European Union delegation in Afghanistan took a similarly optimistic view of the news.
"The initialling of a peace agreement by the Government of Afghanistan and Hezb-e Islami Gulbuddin sends a strong signal of hope for Afghanistan. It demonstrates that political processes can succeed where conflict cannot," the EU statement said.
Still, the government's decision to embrace Hekmetyar has caused concern among some Afghans who feel he should be brought to justice for his actions during the civil war, which saw him and other mujahideen leaders launching thousands of rockets a day into Kabul.
At a protest in Kabul demonstrators held masks with Hekmetyar's face on them in a show of anger at the deal.
Human Rights Watch pointed to the abuses Hekmetyar and other warlords are accused of carrying out during the four-year civil war in a dispatch released on the eve of the agreement's signing.
"His return will compound the culture of impunity that the Afghan government and its foreign donors have fostered by not pursuing accountability for the many victims of forces commanded by Hekmatyar and other warlords that laid waste to much of the country in the 1990s."
The New York-based rights group also said that while other mujahideen commanders — including several now in the current government — were also responsible for abuses, Hekmetyar's crimes should not go unnoticed.
"While other factions fighting for control of Kabul were also horrific Hekmatyar bears responsibility for some of the most egregious incidents, including barrages in August 1992 that killed at least 1,000 people and wounded 8,000, according to the International Committee of the Red Cross."
A controversial 2007 amnesty offered similar impunity to other warlords on all sides who took part in fighting before 2001.