The government and rebels of South Sudan on Sunday signed a power-sharing agreement in Khartoum to end a deadly civil war that has been ravaging the world’s youngest country.

President Salva Kiir’s team will take 20 positions in the new 35-member government, 9 positions will go to Riek Machar’s group while the rest goes to other small opposition groups in the country.

Also, in the country’s 550-member parliament, Kiir’s group will get 332 members while 128 members would emerge from Machar’s group.

Under the agreement, main opposition rebel, Machar will join a government of national unity under which he will serve as the country’s first vice president.

 Kiir and Machar have already agreed to a permanent ceasefire and to withdraw their troops from urban areas.They have also agreed to sign a preliminary power-sharing agreement on July 25, even as negotiations continue until a final peace agreement is signed.

Once a final peace agreement is signed, the belligerents will have three months to form a transitional government, which is expected to be in power in the country for a period of 36 months.