Updated

Afghan President Ashraf Ghani has signed a peace treaty with a notorious warlord, pledging to lobby the U.S. and the United Nations to remove him and his party from terrorist blacklists.

Gulbuddin Hekmatyar signed the agreement Thursday via a video link into Kabul's presidential palace. The ceremony was broadcast live on television.

It is the first peace treaty the Afghan government has completed since the war with the Taliban began in 2001.

It has been welcomed by the international community as a possible template for any future peace deal with the Taliban.

Once sanctions are lifted, Hekmatyar is expected to return to Afghanistan after 20 years in exile. He is believed to be in Pakistan.

The head of his delegation in Kabul, Amin Karim, says this could happen within weeks.