Somali soldiers patrol a quiet village as locals sit on the terrace of a cafe, chatting and reading newspapers, when suddenly rebels armed with assault rifles appear and ambush them. The soldiers evacuate their wounded and take up positions while they wait for reinforcements. The scene is far from the sandy streets of Somalia\'s war-torn seaside capital Mogadishu. The Somalis are at the Bihanga military camp, which lies in a region of lush green rolling hills in south-west Uganda. The fighters are neither battle-hardened soldiers nor Islamist insurgents, but rather new recruits wrapping up their training in a mock urban environment. About 600 Somalis, including 15 women, from the security forces have spent the past six months being coached by instructors from Uganda and the European Union. Since April 2010 the mission has trained some 1,700 recruits. The idea of the training came after the overthrow of Somalia\'s Islamic Courts Union in 2006 by the US-backed invasion of Ethiopian troops. It was followed by the establishment of a weak Western-backed transitional government, protected by an African Union force, AMISOM. At the time, the international community reckoned it had \"the best opportunity of the past 20 years to stabilise Somalia,\" said EU political advisor Jean-Francois Hasperue. \"It was obvious there was no army in Somalia. The army was more a jumble of militia groups than an actual army and so we had to recreate one.\" Somalia has been without an effective central government since the ousting of president Siad Barre in 1991, which left clans, rival militia and Islamist extremists all fighting to control swathes of territory. The current transitional authorities have come under repeated attack, most notably by the Al-Qaeda-linked Shebab fighters, who have vowed to topple them. In recent months, however, regional armies and government troops have clawed a lot of territory back from the Shebab, with AU forces in Mogadishu, Ethiopian soldiers in the south and west, and Kenyan and AU troops in the south. At Bihanga, European and Ugandan instructors have gone about creating an army by first focusing on setting up organised military command structures as in a regular force. \"Our goal is to work on the command chain, that is the main weakness,\" Hasperue said. Retaining that command structure back in Somalia is seen as a way of suppressing the clan allegiances that dog the Somali army. The recruits are paid a total of $600 for the six months of training -- but in a lump sum at the end to avoid disciplinary issues. The pay is equivalent to what they will earn back in Somalia, where some 10,000 members of the Somali army receive $100 a month, a good wage in the impoverished war-ravaged country. The United States pays the salary of two-thirds of the soldiers, with Italy providing for the remainder. But Choukri Daher, a female recruit, insists she is not there for the money. \"I want my country to be free,\" said the young woman, who comes from the northern breakaway state of Puntland where she was unemployed. \"I want to help my country, my people,\" said Adam Hassan Osman, 27, who was already in the army before coming to Bihanga. He says he has learned \"discipline\" and \"a more professional approach.\" Once back in Mogadishu, the recruits will have a few more weeks of training with AMISOM, although the Somalis say they would like further European-led instruction in Mogadishu too. But the EU has hesitated on the grounds that discipline would be harder to maintain in the Somali capital. Mogadishu is also the target of regular guerrilla attacks, tactics the insurgents have turned to since the Shebab pulled out of fixed positions in the city in August. \"We will think about it, assess the situation,\" said EU official Maciej Popowski, adding that rehabilitating an army will not be sufficient to stabilize Somalia unless political reforms follow. That will be a key issue for the coming months. The transitional authorities, who have failed in five years to restore a central authority, have until August to forge a new constitution, a new parliament and a new government. Many observers fear the process will fall through. But Popowski wants to believe that the authorities will stick to the calendar and that a \"trustworthy and functioning government\" will finally emerge.