By Karen Allen
BBC News, Uganda
President Museveni is confident his troops can help 'Somali brothers'
It seemed more like a victory parade than a send-off for a peacekeeping force heading for one of the most volatile countries in the world.
The garrison town of Jinja, 50 miles (80km) east of Kampala, is calm compared with the mortars and gunfire of Somalia's capital, Mogadishu.
As the "white mambas" - the famous military band of the Ugandan army - belted out a tune designed to rouse the troops, many soldiers broke out into spontaneous battle cries and applause, waving off a fleet of white armoured personnel carriers with AU (African Union) markings on the side.
Within days, an infantry and tank battalion along with support teams will be on Somali soil with the first contingent of Ugandan soldiers operating as an African Union force.
The expectation is that other troops will join them, but the numbers being pledged by Ghana, Malawi, Nigeria and Burundi fall short of the 8,000 troops the African Union says it needs to do the job in Somalia.
The fear is that, just like Darfur, the force could be under strength and under-resourced.
Only time will tell, and any targeting of Ugandan troops by insurgents in Somalia could give other troop-contributing nations cold feet, derailing the mission.
Yet President Yoweri Museveni, commander-in-chief of Uganda's armed forces, is confident his troops are up to the job.
At a "flagging off" ceremony in Jinja to hand Uganda's national flag to contingent commander Colonel Peter Elwelu, the president said his was an experienced force, with a clear mandate.
The departure of Ugandan troops was like a victory parade
"We don't go to Somalia to impose peace on the Somalis... What we are going to do is empower our Somali brothers to rebuild their state," he said.
"We are not going to disarm Somali militias. That is not our job. Once we empower the Somalis, if they think the guns should be removed from the population they will be the ones to do it."
The function of the Ugandan troops will be to train Somali security forces to maintain control and protect the fragile Somali government.
Tension with Ethiopians
It is a role which, up until now, has been largely the preserve of Ethiopian troops who are widely resented in Somalia.
Ethiopia has traditionally been a rival.
It was the Ethiopians who helped to install Somalia's present government, and the Ethiopians (along with the US) who crushed the Islamist insurgency in a series of powerful air strikes in January.
The fighters, who came within inches of toppling the Somali government, were forced to retreat, but remnants of their movement are still at large, threatening revenge.
The Western world believes the Islamists have given shelter to al-Qaeda operatives, foreign fighters responsible for past terrorist attacks in the region.
So money has been poured into the Ethiopian military to keep its neighbour in check.
Now the Ethiopians are beginning to withdraw and peacekeepers are being sent in.
Once Ugandan forces get a flavour of the daily street battles in Mogadishu - and there are real fears they could find themselves the focus of insurgent attacks - the mood could turn sour.
Previous missions to Somalia have failed, some with heavy foreign casualties.
Uganda may be in the vanguard as the first to send its troops to Somalia, but the rest of the international community is also under pressure not to turn its back on a country that has struggled to find peace in the past 15 years.