FILE PHOTO: South Sudan's President Salva Kiir (L) and South Sudan rebel leader Riek Machar (R) dance during a South Sudan peace meeting as part of talks to negotiate an end to a civil war that broke out in 2013, in Khartoum, Sudan June 25, 2018. REUTERS/Mohamed Nureldin Abdallah

KHARTOUM (Reuters) - South Sudan’s government and the main rebel group inked a power-sharing deal in the Sudanese capital on Wednesday which they hope will end years of conflict, a Reuters witness said, but smaller opposition groups have refrained from signing.

Riek Machar, a former vice president who will be reinstated into his old post under the deal, was in the room when the agreement was signed by representatives of the government and his group at a security compound in Khartoum.

The agreement, which was reached earlier this month in talks in Uganda, provides for creating a new 35-member government comprising 20 ministers from the current government of President Salva Kiir. Machar’s SPLM-IO rebel group will have nine portfolios and the rest will go to other opposition groups.

Apart from Machar, Kiir will have four more deputies during an interim period under the agreement that was guided by Sudan and other east African nations.

But another opposition group, the SPLM, said in a statement the latest version of the proposed agreement contained several shortfalls, including a “serious lack of consistency in allocating power-sharing ratios at all levels of governance”.

It also cited “lack of clarity” on whether to dissolve a transitional legislature or to expand it to make it more inclusive.

Sudanese Foreign Minister Al-Dirdiri Mohamed Ahmed acknowledged some issues needed more work, including how to share power in local government administration.

South Sudan descended into a civil war that ravaged the country in 2013 after a political disagreement between Machar and Kiir pushed them apart.

Several attempts to end the conflict have ended in failure.