Ugandan troops make up the bulk of the African Union force helping Somalia's UN-backed government. With much of the country under the control of al-Shabab Islamist militants, it is probably one of the most dangerous missions that a soldier could embark on. So why are Ugandans choosing to take part?
Maj Duncan Kashoma still carries the cost of his service in Mogadishu.
The scars on his body are easily visible. The fragments of shrapnel inside him, less so.
"I'm waiting for another operation on my left leg to remove more metal pieces. They will remove my kneecap. They already took off the right kneecap. In cold weather, it hurts a lot."
Maj Kashoma was one of the first Ugandan officers to enter Somalia when the African Union Mission in Somalia (Amisom) began in 2007.
He says Ugandan soldiers were used to operating under the cover of the jungle in pursuit of the rebel Lord's Resistance Army in the north, but they were not fully prepared for the exposed fighting in Somalia's desert terrain and in Mogadishu's shattered cityscape.
"My soldiers had been firing an anti-aircraft gun from the roof of a building in front of the State House in Mogadishu. When you use that gun in one position, the enemy will locate the place and you have to change.
"I had gone there to change that to a new position. But I think they had an infiltrator from al-Shabab directing the fire. They hit three positions at once. I was hit with an 83mm mortar."
Maj Kashoma was seriously injured.
He had loosened his flak jacket. His chest and abdomen were sliced open.
"My intestines came out. I didn't know. I was trying to see what had happened to my soldiers. In those circumstances, when you are shot, you don't know until they tell you".
Six of his men were killed.
"I was bleeding for three days," he says.
Some shrapnel is still in his eye and he is now awaiting help from a specialist eye hospital in London.
In the 1980s, Maj Kashoma joined the National Resistance Movement (NRM) that fought its way across Uganda to take power from the Ugandan military regime that had an appalling human rights record.
He entered the capital, Kampala, with NRM leader - now President - Yoweri Museveni in 1986.
John Njoroge has also seen first-hand the nerve-wracking conditions the Ugandan Amisom troops face in Mogadishu.
The journalist - who writes for Kampala's Daily Monitor newspaper - has been embedded with them three times.
"It's hellish. Just getting to Mogadishu is bad enough. We flew in on an old Russian plane chartered by the UN - 40 of us sitting next to boxes of live ammunition," he says.
"You land with a bang. They get down onto the short runway as fast as possible because there are al-Shabab controlled hills overlooking the airstrip."
Mr Njoroge talks of sleepless nights because of the continuous fighting - but the quiet nights did little to allay his fears.
"I was scared stiff on a later night because there was no shooting - it was quiet. I was afraid al-Shabab had overrun the camp."
The Ugandan army is reluctant to talk in detail about the number of casualties it is taking.
Army spokesman Col Felix Kulayigye says they have lost 80 men since the operation began in 2007; Ugandan analysts and journalists consider that to be a massive underestimate.
Mr Njoroge says that when they are told two soldiers have been killed, they assume the figure is more like 20.
"You can tell that from the number of medical flights coming into the UN base in Kampala," he says.
Col Kulayigye says al-Shabab is a difficult enemy because they often look like civilians and because they have become expert in the use of non-conventional weapons such as improvised explosive devices, or IEDs.
They also disguise themselves as government soldiers - a method used to devastating effect when two suicide bombers attacked the Amisom headquarters in Mogadishu in September 2009, killing more than 20 people.
With the mission being such a dangerous one, why is Uganda so involved - providing 5,700 troops?
For an individual soldier, the financial incentive to fight in Somalia is clear.
The lowest paid Ugandan soldiers earn around $120 (£76) per month; if they opt to fight in Somalia they earn more than $1,000.
For Col Kulayigye, Ugandan troops are on Somali soil because of regional politics: "If Somalia is unstable, Kenya is unstable. And if Kenya's unstable, then we are unstable, first and foremost."
Mr Njoroge claims there is another reason.
"Uganda has never had a peaceful transition of power. Guns and soldiers have always been involved in a change of regime.
"The ruling NRM party does not want thousands of soldiers hanging around in barracks with time on their hands. And there is no work for them outside the army - unemployment is 50% here," he says.
"President Museveni has been in power for almost 26 years and his popularity is waning. Military officers are already getting restless. From the government's point of view, better for them to be fighting in Somalia."
Support for that argument comes in the form of what Ugandan newspapers are calling "the battle of the generals" - a brewing row between the current chief of the Ugandan Defence Forces, Gen Aronda Nyakairima, and retired army commander Maj Gen Mugisha Muntu, who is now a member of the opposition Forum for Democratic Change.
Gen Muntu recently advised his successor, "be wise and avoid ending up like the proverbial fly, which followed a corpse into the grave".
Then there is the "proxy war" theory that comes up in many conversations about Uganda's role.
Some say the Ugandan military is doing the job that the US wants done, but is not willing to get directly involved in.
Some people are glad that Uganda is punching above its weight in the region by leading Amisom, others believe Uganda's involvement has turned the Islamist militants' guns against it.
In July 2010, a double suicide bombing in the Ugandan capital, Kampala, killed 76 people who were watching the football World Cup final on television, leading to calls to withdraw Ugandan forces.
Others say the cost of the mission is too high, believing the money should instead be spent on improving broken roads and installing electricity for the many Ugandans who are still not connected to the grid - as high as 88% of the population according to some estimates.
But for Maj Kashoma - who has paid such a high price for his nation's intervention in Somalia - the reasons for remaining are close to his heart.
"I joined this army when I was still young. If you see what happened in our country before we liberated it, it was chaos, like in Somalia; people losing their lives for nothing.
"I think that's what gives us a reason to liberate our sisters and brothers in Somalia."