KABUL, Afghanistan — President Ashraf Ghani signed a peace agreement Thursday morning with insurgent leader — and U.S.-designated “global terrorist” — Gulbuddin Hekmatyar, founder of the militant group Hezb-e-Islami.

Officials hope the deal, signed at the presidential palace and broadcast live on television, will provide a template for peace with other insurgent groups.

The agreement, the first Afghan peace accord since 2001, is seen as largely symbolic. Hezb-e-Islami has had no significant presence on the battlefield in years. Its last major attack was a car bombing three years ago that killed six American soldiers and nine Afghan civilians.

In an unusual twist, Hekmatyar joined the ceremony via video link from an undisclosed location. The United States and United Nations have long blacklisted the notorious warlord as a terrorist, though the Afghan government has committed to seek the lifting of sanctions against him and his group, which will allow him to return to Afghanistan for the first time in 20 years. He is believed to be in Pakistan.

Ghani said there was nothing in the agreement that violated the Afghan constitution and pledged to implement it. He urged the Taliban to follow suit.

“Now the Taliban has a chance, if they want to join the peace process, to reconcile with the nation, or if they want to stand against the nation, to continue a war that benefits foreigners,” Ghani said, referring to Pakistan, which Afghan officials have long accused of supporting the insurgency.

Hekmatyar, who is in his late 60s, founded Hezb-e-Islami in the 1970s and had been a major figure in Afghan politics since the war against the Soviets in the 1980s, when he was a leading recipient of U.S., British and Pakistani military aid.

He is accused of grave human rights abuses and the indiscriminate shelling of Kabul during the Afghan civil war in the 1990s, which killed thousands. At that time, he also gained a reputation for forging and breaking alliances while seeking power.

He served as prime minister twice after the Soviet withdrawal but fled to Iran after the Taliban seized Kabul in 1996. He was expelled by Iran in 2002 and went into hiding, then re-emerging as an influential political and insurgent figure who has sometimes allied his group with the Taliban and al-Qaida.

The agreement grants the warlord and his group amnesty, cash, land and a part in the country’s political life in return for ending its violent militancy forever and cutting ties with terrorist organizations. Officials have expressed hope the accord will encourage other anti-government groups to join a political peace process.

But some Afghans feel the terms are too generous for a man protesters of the deal last week called the “butcher of Kabul,” and who has shown little, if any, public remorse for past atrocities. After this week’s ceremony some Afghans changed their Facebook profile pictures to black as a sign of protest.

Hekmatyar isn’t the first warlord accused of grave rights abuses to reconcile with Kabul. Several others are part of the Afghan government and have profited from the billions of dollars in foreign aid that has poured into the country during the 15-year war against Islamist militants.

U.S. and United Nations officials, along with some of Kabul’s other foreign backers, welcomed the agreement last week. U.S. Army Gen. John W. Nicholson, commander of U.S. Forces-Afghanistan and the NATO-led advise and training mission, told reporters at the Pentagon that the agreement was “encouraging” and that reconciliation between Kabul and all “belligerents,” including the Taliban, was a key step to ending the conflict.

“There’s many belligerents ... people who, in the past, have fought against each other,” Nicholson said. “Some of these belligerents are in the government together now.”

The agreement clears the way for Hekmatyar to run for political office. It came after two years of negotiation and after he dropped a key condition — that foreign forces leave Afghanistan. On Thursday, he called on other groups to choose an end to the insurgency.

“Continuing the war in the current time does not help Afghans; it helps the domestic and foreign enemies,” he said. “Afghans get killed in this war, and their homes get destroyed.”

The Taliban, however, have repeatedly rejected Kabul’s attempts to broker a peace settlement, and an article on the group’s Voice of Jihad website, which did not specifically mention the accord, said abandoning jihad against foreign forces and cooperating with the Western-backed Kabul government was a “major crime” that would earn the “wrath of Allah.”

Zubair Babakarkhail contributed to this report.

garland.chad@stripes.com