The decision comes after months of hesitation by South Sudan after soaring violence erupted in Juba in July.

The South Sudan government has agreed to accept the deployment of a UN-mandated regional force in Juba, a spokesman said, after months of hesitation over whether to allow extra foreign troops on its soil.

Deputy Information Minister Akol Paul Kordit said late on Friday that the “cabinet has resolved unanimously to allow the deployment of the regional protection force anytime from now”.

His announcement came after lengthy deliberations during a cabinet meeting chaired by President Salva Kiir, but no details were given about when and where in the capital the force would be deployed.

South Sudan descended into war in December 2013, two years after winning independence, after Kiir accused his former deputy Riek Machar of plotting a coup.

Despite an August 2015 peace accord heavy fighting erupted in Juba in July during which peacekeepers failed to protect civilians, according to a UN investigation.

In response the UN Security Council authorised the deployment of an additional 4,000 troops from East Africa with a stronger mandate than the 16,000-strong UN peacekeeping mission UNMISS.

Kiir initially opposed the deployment of additional troops as a breach of national sovereignty but later agreed to their deployment on September 4.

Since then his government has been accused by the UN of failing to take concrete action.

Ethiopia and Rwanda will contribute infantry troops to the new force.

Kenya was supposed to do the same but is instead pulling its soldiers out of South Sudan in protest at a UN decision to fire the Kenyan commander of the mission for failing to protect civilians.

The US has launched a bid to impose an arms embargo on South Sudan, after US Ambassador Samantha Power said months of talks with South Sudan’s leaders had failed to persuade them to opt for peace.