Notorious Afghan warlord Gulbuddin Hekmatyar has called for peace as he appeared by video to sign an accord with President Ashraf Ghani.
Ghani signed the peace deal at Kabul's presidential palace during a ceremony broadcast live on television on September 29.
Hekmatyar, the exiled leader of the Hezb-e Islami militant group, was not present and addressed the gathering in Kabul in a recorded video message, appearing by himself to sign the document in a small room.
He offered his congratulations to "all those Afghans who want peace and stability in the region," adding, "I pray that our country be independent and sovereign, and our innocent and war-weary nation end the fighting and ongoing insecurity, and that unity prevails."
"Now is the time for the Taliban to think about whether they want to continue the war or come for peace," Ghani said.
Under the agreement, Hekmatyar will be granted amnesty for past offenses and certain Hezb-e Islami prisoners will be released by the government. The Afghan government also agreed to press for the lifting of international sanctions on Hekmatyar. The deal also includes provisions for his security at government expense.
Negotiations with the group have been going on for months, with some in the government suspicious of bringing one of the most radical militants in Afghanistan into the fold.
Rights activists have expressed concerns about human rights abuses committed by Hekmatyar, who was responsible for some of the worst atrocities committed during the civil war in the 1990s.
Hezb-e Islami has also carried out deadly attacks against U.S. and Afghan forces since the U.S.-led invasion in 2001.
Kabul hopes a deal with Hezb-e Islami can convince the Taliban to end its insurgency and join the political process.