A U.N. peacekeeper stands guard near children displaced in recent fighting, during a visit by the United Nations Security Council, delegation to the UN House in Jebel, near South Sudan's capital Juba

Juba: The government of South Sudan agreed on Sunday to accept 4,000 extra peacekeepers in a bid to avoid an arms embargo threatened by the United Nations Security Council, but said the details of the deployment were still being discussed.

The announcement came after a meeting in the South Sudanese capital, Juba, between President Salva Kiir and the U.N. Security Council, led by U.S. Ambassador Samantha Power.

The 15-member council last month authorized the deployment of a 4,000-strong regional protection force as part of the U.N. peacekeeping mission already on the ground, known as UNMISS. It threatened to consider an arms embargo if Kiir's government did not cooperate.

"To improve the security situation the Transitional Government of National Unity gave its consent to the deployment, as part of UNMISS, of the regional protection force," the South Sudanese government and the Security Council said in a joint communique.

The countries contributing troops to the force, UNMISS and the government would "continue to work through the modalities of deployment," the statement said.

East African regional bloc IGAD pushed for a regional protection force and has pledged to provide the troops. South Sudan Minister of Cabinet Affairs, Martin Elia Lomoro, said the government had no objection to who contributes soldiers.

The council authorized the new force following several days of heavy fighting involving tanks and helicopters in Juba in July between troops loyal to Kiir and those backing former Vice President Riek Machar. The violence raised fears of a return to full scale civil war in the world's newest nation.

In the resolution, the council pledged to discuss imposing a possible arms embargo on South Sudan if U.N. Secretary-General Ban Ki-moon reports back in mid-September that the government was not cooperating on the force and was obstructing the work of peacekeepers on the ground.

"The Transitional Government of National Unity commits to permit free movement to UNMISS in conformity with its mandate, including to protect civilians," according to the statement on Sunday.

The government and the peacekeeping force will come up with "concrete steps to remove impediments to UNMISS' ability to implement its mandate."

U.N. peacekeepers have been deployed in South Sudan since 2011, when the country gained independence from Sudan.

Political rivalry between Kiir and Machar sparked a civil war in 2013, but while the pair signed a shaky peace deal a year ago, fighting has continued and Machar fled the country after the eruption of violence in July.

"The challenge now is to make sure that a piece of paper becomes operationalized," Power told reporters after meeting Kiir. "Now we have to turn it into steps to improve life for people in great need."

The government and the Security Council agreed "that the humanitarian and security needs of the people were paramount."