This morning our Ugandan host - Major Barigye Ba-Hoku, spokesman for the African Union peacekeeping force, Amisom - is grinning broadly as he promises us a "safe - well quite safe" tour of the frontlines in Mogadishu.
Before we set off, he produces his mobile phone and shows me the text messages he says he constantly receives from the Islamist al-Shabab militia. "You will be killed in three days," says one. Major B-B, as he's known, sounds rather proud. "There is an oral culture in Somalia, so because I am the spokesman they think I am very powerful. The terrorists call me up all the time."
Major B-B is anxious to show that Amisom has not only shrugged off what is known here as "the Ramadan offensive" by al-Shabab, but actually seized more territory in the city centre. It's hard to be definitive, but Amisom seems confident that it now controls more than half the Somali capital.
Amisom has only just reached its intended strength of 8,000 men
The subtext, underlined repeatedly during the day, is that if only the international community would step in and pay for a few thousand extra Ugandan troops - say 20,000 in all - the whole city could be secured within a matter of months. Amisom have been here for more than three years now, but have only just reached their intended strength of 8,000 men. Their mandate is also a largely defensive one, limiting their ability to take the fight to al-Shabab.
Amisom is also facing growing criticism over allegations that it is shelling and firing mortars in civilian areas, causing many hundreds of casualties. The sooner it can take the whole city - three months' work according to one officer - the quicker those criticisms will stop.
We put on our flak jackets and helmets once again, and squeeze inside the sweltering armoured trucks. We've been told not to discuss our movements on local phones because al-Shabab may be monitoring them.
Twenty minutes later we're climbing the crumbling staircase of a huge ruin overlooking the beach. This used to be Hotel Urbha. Now it is an artillery-blasted concrete skeleton, filled with Ugandan soldiers peering out from behind their sandbags at al-Shabab positions perhaps a kilometre away. Along the spectacular, rocky shoreline, children are splashing in the surf.
A Ugandan officer points to a dusty road, and a barely visible line of sandbags. "Al-Shabab trenches," he says. "They are tunnelling too." Snipers and mortars are a problem, but it seems the major threat comes from suicide bombers and roadside bombs.
A few minutes later, sweat soaking through our flak jackets, we're half-running across open ground towards a gaping hole in the side of a small cottage. We're just a hundred metres or so from al-Shabab's positions now, and weaving through buildings and gardens, occasionally making a quick dash across exposed territory.
"Run, run, run," shouts Major B-B. From behind us there's a fairly steady thump of machine-gun fire from Ugandan troops. Then suddenly, the whip-crack of incoming sniper fire overhead, then another, and a little further away, the boom of mortars. It's turning into a lively morning.
Right on the frontlines, in a neighbourhood cluttered with ruined buildings, we meet our first Somali troops, working alongside Amisom. There are a few civilians here too - two women selling cigarettes and an older man praying in a courtyard as bullets zip and crackle nearby. We pass a giant cauldron with the remains of some pasta caked to the bottom.
"I'm here to fight the terrorists," says a middle-aged Somali soldier clutching a Kalashnikov. Twenty-one-year-old Hassan Abdi Mohammed says he's just come back from a training camp in Uganda, funded by the European Union - part of a broader international strategy to strengthen the UN-backed government's infrastructure and security forces to enable it to take a lead in stabilising Somalia. "We want to fight and win," Hassan declares.
But the Ugandan officers don't hide their frustration with their Somali colleagues. "There are problems," says one. "They are not yet up to standard." And there's a broader concern that the clan rivalries and political divisions that erupt so frequently within the government filter down almost instantly to the street, meaning the AU peacekeepers can never be entirely sure of the support of their Somali colleagues on the frontlines.
Another AU officer complains that "many Somali troops are defecting" to al-Shabab. The simple reason is money not ideology. Several Somali soldiers quietly tell me they haven't been paid in months.
From the Urbha Hotel, one can see the beach on side and fighting on the other
We snake back on foot, heads low, half-running, weaving through the rubble, ducking under the barrel of an old Soviet tank. Then suddenly we're close to the beach again - a searing ribbon of blue on the horizon, groups of old men sipping tea in the shade, some fishing boats in the ancient harbour. A Ugandan colonel has prepared a hot lunch for us on the third floor of the gutted Urbha Hotel. Beach on one side. War on the other. A surreal experience.
A while later, back at the Amisom compound, we run into Uganda's President, Yoweri Museveni, surrounded by a group of soldiers singing and clapping. "Ah you media," he says with a grin. "You are all muck-rakers." He's the first foreign head of state to visit the country in many years and after meeting the president, he agrees to a short interview.
The focus, inevitably, is on the need for more troops - and on who will pay for them. The international community doesn't "take Somalia's problems very seriously," President Museveni tells me. "They're near, on the ocean having a nice time, but the problem is here on land. I don't know how much money they're spending on ships but the pirates come from the land." He's ready to send more troops here, but only if Western governments are prepared to foot the bill.