* Deal includes commitment by M23 to end rebellion
* Millions have died of war, famine and disease in E. Congo
* Congo govt says no blind amnesty after conflict
The Congolese government signed a peace deal on Thursday with the M23 rebels it had been fighting until they laid down their arms last month, ending weeks of wrangling over the terms of an agreement.
The deal apparently concludes the most serious rebellion in Congo in a decade but analysts say the region remains fragile, not least because the agreement does not address the status of other armed groups.
M23 is the latest incarnation of the Tutsi-led insurgents who have battled Congo's government in its mineral-rich eastern region since 1996, in an evolving conflict that has caused the deaths of millions from violence, hunger and disease.
"Today the DRC (Congo) government and M23 have respectively signed declarations reflecting the consensus reached during the Kampala Dialogue on steps necessary to end the armed activities of the M23," said a joint communique.
Two declarations were signed which together comprise 11 points agreed on by the parties, said the communique, signed by President Yoweri Museveni of Uganda and President Joyce Banda of Malawi.
These include a decision by the M23 to end the rebellion and transform itself into a political party, an amnesty to M23 members only for acts of war or insurgency and the demobilisation of former M23 members.
It included agreement on the release of those held by Congo for war or rebellion and called for the return of those displaced by fighting. It also called for the formation of a committee to handle property and land that was confiscated, stolen or destroyed.
"NO BLANKET AMNESTY"
"The document is very clear: there is no blanket amnesty. Those who are presumed to have committed criminal behaviour in terms of international law, war crimes or crimes against humanity will not be reinserted into society," said Congo government spokesman Lambert Mende.
"There will be justice, and no blind amnesty. Whether justice is done here in Congo or in the Hague, it does not matter," he said, adding that the deal was signed at State House in Nairobi.
There was no immediate comment from former M23 rebels.
"We have been conducting some talks to try to conclude the dialogue between the two parties (M23 and Kinshasa) and I am informed this evening the final document was signed in Nairobi," James Mugume, Foreign Affairs Permanent Secretary.
U.N. experts have accused Uganda and Rwanda of backing the rebels during the uprising. Both countries deny the charge.
Last November, M23 rebels occupied Goma, a town of a million people and the capital of North Kivu province on the border with Rwanda. They withdrew under intense diplomatic pressure that led to the opening of talks in Uganda.
However, the fall of Goma led to a revamping of Congo's army and the strengthening of the U.N. force and its mandate in Congo.
When peace talks faltered, rebels were driven from all the remaining towns they occupied in a process that ended in November.
Kinshasa and the rebels failed to seal a deal last month after a dispute over what it should be called. The rebels were ready to sign a peace agreement but Congo's negotiators wanted to call it a declaration, reflecting the rebels' defeat.
The difficulty of concluding a deal highlighted deep-rooted regional tensions after the fighting.
Thursday's communique signalled the end of peace talks held under the auspices of the International Conference on the Great Lakes Region and the Southern African Development Community region.