It's fair to say that the Ugandan government was not particularly happy with the contents of a United Nations report that unequivocally implicated it in the ongoing rebellion in the Democratic Republic of Congo. The report, compiled by a "group of experts" appointed to look into the issue, found that Uganda was assisting the M23 rebel movement "in the form of direct troop reinforcements in DRC territory, weapons deliveries, technical assistance, joint planning, political advice and facilitation of external relations".

It was a damning conclusion, and caused diplomatic shockwaves throughout the region; with Rwanda also blamed for assisting the rebels, the conflict in North Kivu started to look less like a rebellion and more like a regional war.

Uganda denied wrongdoing in no uncertain terms, and Prime Minister Amama Mbabazi castigated what he described as a baseless, unfair and malicious report; one that was compiled without following due process and with minimal input from concerned stakeholders. This was two weeks ago.

Since then, the Ugandan government has got even angrier, until it decided to play its trump card. Fine, they said; if the international community insists on propagating these baseless accusations about Uganda, then they shouldn't expect Ugandan troops to keep on keeping the fragile peace in a country where the international community fears to tread: Somalia.

Since 2007, Ugandan soldiers have been the backbone of the African Union Mission in Somalia (Amisom). At any one time since then, there have been at least 5,000 Ugandans on the ground in Somalia, and the number is often higher. Given the unwillingness of other countries to contribute troops (with the exception of Burundi initially, and now Djibouti, Kenya and Sierra Leone), it is no exaggeration to say it was the Ugandan military that kept Somalia's unstable transitional government in some semblance of power for so long, providing the foundation for the recent assault on Al-Shabaab that severely damaged the Islamist militant group.

Even in the wake of the recent successes, Somalia is a dangerous country, and its capital, Mogadishu, particularly so. With no real security forces of its own to rely on, the Somali government continues to be propped up by Amisom, which is still disproportionately reliant on Ugandan soldiers, which account for a full third of its troop contingent in Somalia. Take the Ugandans away, and it is likely that the entire fragile edifice will come crumbling down.

But that is what Uganda wants to do, according to Security Minister Wilson Mukasa. "We are tired of being maligned even after sacrifices have been made to ensure that our friends, our neighbours are okay. The 'thank you' we get is that you are now aiding this, you are this and that, so we are tired," he told reporters in Kampala. This has forced the government to conclude that it is safer and easier to forget about this business of international peacekeeping and intervention: "Let's stop all these initiatives. We will concentrate on ourselves. Whoever wants to cause us trouble, they will find us at our home." He added that Uganda had already despatched an official to New York to inform the United Nations of this decision.

While in New York, one suspects that this unnamed official will also have a few meetings with other unnamed officials from the United States, which has its own vested interests in Somalia. The US has been deeply concerned for a long time about the threat posed by Al-Shabaab, and in particular its links with al-Qaeda. This makes Somalia another front in the War on Terror, but one in which the US is reluctant to participate directly. A happy solution was found in which African countries – primarily Uganda – were supported, both technically and financially, to put non-American boots on the ground. If Uganda is thinking about deserting its position on the frontline of the War on Terror in Somalia, risking an Al-Shabaab resurgence, it is likely the White House or State Department will have a few things to say.

Chances are, however, that Uganda has no intention of actually going through with its threat of summary withdrawal. "It's just politics and playing to the gallery. They won't pull out," said analyst Hamza Mohamed, a specialist on Somalia. His sources in Mogadishu suggest there have been no plans to follow through on the threat, which is likely designed as a warning to the international community to ease its criticism of Uganda's Congolese adventures. "Things will be quietly settled behind closed doors with perhaps future reports not being so critical," he added.

It's hard to see any other outcome. With the international and African community happy to outsource the establishment of Somali democracy to countries like Uganda, which doesn't exactly have a wonderful governance record itself, it should come as no surprise when those countries demand their quid pro quo.

In this case, Uganda is asking the international community to choose between exposing the roots of the conflict in the eastern DRC and maintaining Somalia's tenuous hold on stability. There's no doubt that Somalia will win this particular trade-off, especially given America's heavy investment in a successful outcome there. It seems less likely, however, that Uganda's involvement in the DRC will be forgotten. If anything, the heavy-handedness of its response – coupled with the evidence in the controversial UN report – suggests that there is some truth to the accusations.