Security in Darfur is worsening and militias need to be disarmed, the US charge d'affaires to Sudan Joseph Stafford said on Sunday, condemning the recent attack which killed a peacekeeper.

Stafford also expressed grave concern "about the reports of civilian casualties and deliberate targeting of civilians by militias in Muhagiriya and Labado", the region where the Nigerian peacekeeper died on Friday.

He told reporters it is not yet clear who carried out the "deeply troubling" attack against the base of the African Union-UN Mission in Darfur (UNAMID) near Muhagiriya town in southern Darfur.

But he said there is an "urgent" need for an investigation bringing those responsible to justice.

Two other peacekeepers were wounded in the assault, two days after the Sudanese government announced it regained control of the area from rebels.

"We're worried about the deteriorating security situation in Darfur and the conflict between the government forces and the militia", Stafford said.

He said "escalation in the acts of violence underscores the need for militia disarmament" as well as other measures including a ceasefire between the government and rebels who have not signed a 2011 peace deal with Khartoum.

That deal is a good foundation but "implementation is proceeding slowly", said Stafford, whose country says it is Darfur's largest single aid provider.

Under the peace deal between the government and rebel splinter factions, Khartoum is responsible for disarming all militia. Last October a monitoring committee set up under the peace pact said authorities had filed a comprehensive plan to disband the groups.

More than 40 peacekeepers have been killed in hostile action during UNAMID's five-year history and the UN has repeatedly called for perpetrators to be brought to justice.

However, UN sources have said they were unaware of anybody previously being held accountable in Sudan for killing a peacekeeper.

In February a UN panel of experts reported "some incidents in which former members of government militias have forcibly expressed their discontent with the current government, especially against the backdrop of rising inflation and unemployment."

It said this discontent has occasionally led to "direct attacks on UNAMID staff and premises".

Ethnic rebels in Sudan's far-western Darfur region rose up against the Arab-dominated Khartoum government in 2003.

In response, government-backed Janjaweed militia shocked the world with atrocities against ethnic Africans.

While the worst of the violence has long passed, instability has been complicated by inter-Arab fighting, kidnappings, carjackings and other crimes, many suspected to be the work of government-linked militia and paramilitary groups.

A rare 10-day rebel occupation of Muhagiriya and Labado ended on Wednesday when the Sudanese army announced it "liberated" the area but the insurgents said they withdrew in the face of massive force.

The Sudan Liberation Army's Minnawi faction had taken control of the strategic district on April 6.

Darfur's insurgents normally stage hit-and-run attacks.

The Minnawi rebels have freed seven government soldiers who were handed over on Sunday to Sudanese authorities, the International Committee of the Red Cross said.

Two of the soldiers were injured, the Red Cross added, without specifying whether the troops had been captured during Minnawi's occupation of the Muhagiriya area.