South Sudan rebel leader Riek Machar arrived in Juba on Wednesday, setting foot in the capital for the first time since he fled in July 2016 following the collapse of a peace deal.

Machar, who has spent the last two years living in exile, traveled to South Sudan to take part in a peace ceremony. He was greeted by his former ally turned rival, President Salva Kiir, at Juba airport on Wednesday morning.

Machar (L) and Kiir (R) signed a peace deal in Sudan in September

Machar is set to be reinstated as vice president under the terms of a recently signed peace agreement. The two South Sudanese leaders were set to join regional leaders for the ceremony, including the presidents of Sudan and Ethiopia, who helped bring about the peace agreement.

It was not clear how long Machar would remain in Juba following the peace ceremony, as his aides are worried about his safety in the city.

A previously scheduled return to Juba for Machar was postponed after disagreements over the number of bodyguards who could accompany him and what weapons they could carry, AFP news agency reported.

South Sudan became the world's youngest nation after it seceded from Sudan in 2011 following decades of conflict fueled by ethnic and religious differences, as well as access to oil.

South Sudan was then beset by civil war in 2013, after Kiir accused Machar of plotting a coup. Troops loyal to Kiir clashed with forces loyal to Machar in Juba, and the fighting eventually spread, causing oil production to shut down, forcing millions to flee and killing an estimated 380,000.

The power-sharing agreement between Kiir and Machar will be the third time that the two rivals have tried to work together since the outbreak of war six years ago.

Read more: South Sudan's youth collect trash to protest civil war

Watch video 02:08 South Sudan: Picking up trash for peace

cmb/sms (AFP, Reuters, AP)

Each evening at 1830 UTC, DW's editors send out a selection of the day's hard news and quality feature journalism. You can sign up to receive it directly here.