Machar sworn in as South Sudan's vice president

South Sudan's rebel leader Riek Machar sworn in as vice president, in third attempt to rule together with his bitter rival President Salva Kiir.

JUBA - South Sudan rebel leader Riek Machar was sworn-in as first vice president on Saturday, formally rejoining the government in the latest bid to bring peace to a nation ravaged by war.

It is the third time that bitter foes Machar and President Salva Kiir will attempt to rule together and the pair have many differences yet to iron out as they form the unity government that is a cornerstone of a September 2018 peace deal.

"For the people of South Sudan, I want to assure you that we will work together to end your suffering," Machar said after taking the oath.

"By forming this government, it gives us hope that there is a new momentum to end the suffering of the people of South Sudan and a way to a sustainable peace."

Machar embraced and shook hands with Kiir after being sworn in.

The rebel leader returns as first vice president. Four other vice presidents from the government and other opposition groups who will also form part of a bloated government.

The rivals started out as president and deputy at independence in 2011 but Kiir sacked Machar in 2013 and later accused him of attempting a coup against him, sparking a bloody war characterised by ethnic conflict.

A 2015 peace deal brought Machar back as vice president and he returned to Juba amid heavy security.

When that deal fell apart in July 2016, the capital was plunged into a brutal battle between rival armies and Machar was forced to flee on foot.

The ensuing war drew in new parts of the country and other local grievances and disputes came to the fore.

After six years of war some 380,000 died, four million fled their homes and more than half the population is facing severe hunger.

The economy of the oil-rich nation is shattered, infrastructure barely non-existent, and millions of children are out of school.

The September peace deal has lead to the longest period of relative calm since 2013 but fighting continues between government and holdout rebel groups in the Central Equatoria region.

Bloody localised conflicts between communities in the absence of a functioning state have soared.

'Much more to work through'

The formation of the unity government comes after almost 18 months of bickering as the warring parties moved at snail's pace to address crucial issues.

It was postponed twice by failure to move forward on forming a unified army, carving out state borders and creating a protection force to assure Machar's security.

Experts had warned against rushing into a new unity government before all the outstanding issues are resolved, saying it could lead to disaster once again.

A last-minute deal on the number of states was achieved, although little progress has been made on the other issues.

Kiir has said his forces would be in charge of Machar's protection as a special VIP protection force is still undergoing training.

A compromise by Kiir to cut to 10 the number of states, which he increased unilaterally to 32 after independence, was seen as key in moving towards the creation of the unity government.

However the opposition remains reticent about an additional three "administrative areas" pushed through by Kiir.

"Kiir's compromise on the states issue paved the way for the two sides to finally move forward, even if the parties have much more to work through in the coming weeks, months, and years," Alan Boswell, a South Sudan expert with the International Crisis Group (ICG) said.

Both Kiir and Machar are former rebel leaders who rose to power during Sudan's 1983-2005 civil war between north and south - a conflict in which the men also fought each other - before South Sudan won freedom in 2011.

United Nations experts say Kiir and Machar are both responsible for most of the violence committed during the war.

The two leaders come from the south's two main ethnic groups - Kiir from the Dinka people and Machar from the Nuer - tribes that are themselves split into multiple and sometimes rival clans.