South Sudan President Salva Kiir on Wednesday declared the release of two political detainees who had been sentenced to death.
James Gatdet and a South African William Endley, who were sentenced by a Juba court in February, will be freed on Thursday.
President Kiir made the declaration during his speech at a peace ceremony in the capital.
"Today, I declare the release of two political prisoners James and Endley," he said.
Mr Gatdet, a former spokesman of rebel leader Riek Machar was arrested in 2017, after his deportation from Nairobi, for allegedly engaging in subversive activities against the Juba administration.
Mr Endley, a retired South African army colonel and for adviser of Mr Machar, was accused of providing him with military support.
"I will release him tomorrow [Thursday] and deport him back to South Africa," Mr Kiir said.
Dr Riek Machar -- who returned to Juba for the first time in more than two years to take part in the ceremony -- reaffirmed his commitment to the implementation of the September 12 peace agreement.
"We come here today to confirm to you that we are for peace. We want peace and unity," he told the crowd at Freedom Square.
"The peace agreement will bring you federal system of governance," he added.
Notable among the special guests at the ceremony were Sudanese President Omar al-Bashir, Ethiopia's newly sworn in President Sahle-Work Zewde, Somali's President Mohamed Abdullahi Mohamed and Ugandan President Yoweri Museveni.
South Sudan won independence from Sudan in 2011 but plunged into a civil war in 2013 after President Kiir accused Machar -- then the vice president-- of plotting a coup against him.
The five-year civil war has killed an estimated 380,000 people and nearly two-and-a-half million others displaced.
A Mo Ibrahim Foundation report recently ranked South Sudan as the second worst governed state in Africa after Somalia.
Several peace accords have been signed but faltered immediately. They include the last one in 2016 that forced Mr Machar to flee into exile.