* Somalia recovering from two decades of civil war
* EU has trained around 3,000 Somali soldiers in Uganda
* Somali president says security his top priority
The European Union is to move military training of Somali soldiers from Uganda to Mogadishu in a show of confidence in Somalia's growing stability after two decades of turmoil, the EU special envoy to Somalia said on Wednesday.
Western donor countries have been unwilling to deploy soldiers inside the Horn of Africa state, but instead fund the African Union's Amisom peacekeeping troops, which have driven Islamist al Shabaab rebels out of Mogadishu and many other strongholds in central and southern Somalia.
The success of Amisom, made up mostly of Ugandan, Burundian and Kenyan soldiers, has encouraged Western countries to look beyond the scars left by the deaths of U.S. and U.N. soldiers during Somalia's violent disintegration into civil war in the early 1990s, and increase their engagement.
The EU's training mission, separate from Amisom, has trained some 3,000 Somali soldiers and officers in Uganda since 2010.
Michele Cervone d'Urso, the EU envoy, said having up to 80 European military staff in Mogadishu was a "game changer".
The EU military experts will focus on providing strategic advice to Somali Defence Ministry staff while also teaching Somali trainers, who will then train their own forces.
"We can have far more impact that way," d'Urso told Reuters inside Mogadishu's heavily guarded airport, where Britain is due to open an embassy for the first time in nearly two decades.
"Having (the training mission) here shows that international European engagement inside Somalia can happen. Gone are the days where Mogadishu was one of the diplomatic black holes."
Somali President Hassan Sheikh Mohamud said establishing security after 20 years of conflict was "priority number one, two and three" for his administration.
However, the bulk of Somalia's armed forces are poorly trained and badly armed, and their ranks are often infiltrated by al Shabaab, which is allied to al Qaeda. They are also seen as corrupt, and serious human rights allegations have been levelled at them, including rapes of women in refugee camps.
"There is no doubt that these (EU-trained) troops are accountable, inclusive, will respect the chain of command and, above all, will respect the human rights of the Somali citizens," Hassan told a delegation of European ambassadors in Mogadishu.