Uganda has threatened to pull its peacekeeping troops out of Somalia and the Democratic Republic of Congo (DRC) after a UN report accused it of backing M23 rebels in the central African country.
In a statement to parliament, Prime Minister Amama Mbabazi said on Friday that the UN report carried baseless, unfair and malicious allegations.
The report, leaked to the media last month, also accused Rwanda, Uganda's southern neighbour, of supporting M23 rebels, who are based in eastern DRC and take their name after a peace agreement they signed with the Congolese government on March 23, 2009.
M23, commanded by Bosco Ntaganda, a warlord indicted by the International Criminal Court, have been battling Congolese troops since March, seizing towns in fighting that has displaced thousands of civilians.
The group is made up of former fighters in the National Congress for the Defence of the People (CNDP), an ethnic Tutsi rebel movement.
Mbabazi said Uganda was acting in good faith and sacrificing a lot to bring peace to the region and deserved better understanding from the UN and the region, reported the state-run New Vision newspaper.
"We have now decided, after due consultations with our brothers in the AU and the region, to completely withdraw from these regional peace efforts; that is to say DRC, Somalia and others," Mbabazi said, according to the paper.
Asuman Kiyingi, Uganda's state minister for regional co-operation, said: "We are saying that if these allegations, which are malicious and unfounded, are not withdrawn then we are considering withdrawing not only from Somalia but from all peacekeeping missions we are involved in."
Uganda, along with Burundi, sent peacekeeping troops to Somalia in 2007 under an African Union mandate backed by the UN.
The peacekeepers have been credited with driving the al-Qaeda-linked rebel group al-Shabab from Mogadishu, Somalia's war-ravaged capital.
A sudden reduction in the peacekeeping force, especially in Mogadishu, would risk unravelling the security gains that allowed the first presidential elections in more than four decades to be held in the capital in September.
Somalia's poorly equipped and ill-disciplined army is more a loose affiliation of rival militias than a cohesive fighting force loyal to a single president.
Sheikh Abdiasis Abu Musab, the spokesman for al Shabaab's military operation, said it was unaware of Uganda's intention to withdraw and that it would keep fighting the African peacekeepers.
"After Ugandans leave, what else, it will be easier to fight the remaining invaders. We shall finish them," he told the Reuters news agency.
Uganda has earned significant Western support for deploying its soldiers to a warzone few foreign powers outside the region have the stomach for.
It also benefits financially for its AMISOM contribution while at the same time a troop presence in Somalia, Central African Republic and South Sudan gives the Ugandan military a big footprint across the region.
"It's just politics and playing to the gallery. They won't pull out. Things will be quietly settled behind closed doors with perhaps future reports not being so critical," said London-based Somali-analyst Hamza Mohamed.
The UN Security Council's Group of Experts said in their report that despite their strong denials, Uganda and Rwanda had continued to support M23 rebels in North Kivu province.
The group, who monitor compliance with sanctions and an arms embargo on the DRC, delivered their report to the Security Council's Congo sanctions committee at the beginning of October.
Both Uganda and Rwanda dismissed the allegation, with Okello Oryem, Uganda's state minister for foreign affairs, saying that the experts' findings were "rubbish and absurd".
"Some of those so-called experts came here [to Uganda] and did not interview anyone," Oryem said.
Mbabazi said Uganda, which shares a border with the DRC, got involved with mediating with M23 rebels following a request by Ban Ki-Moon, the UN chief and Joseph Kabila, the president of the DRC.