(Reuters) - Somalia's security forces need rebuilding to cement gains made by foreign troops against Islamist militants, but how to pay and arm recruits, tackle corruption and prevent rebels infiltrating their ranks remain hurdles for the cash-strapped government.
Proving the dire state of the Somali forces, when Islamist gunmen attacked a court in Mogadishu in April, police said they couldn't tell who was friend or foe, while members of the force say a $100-a-month salary is not enough to inspire loyalty.
"Shoe shiners have a better life," said a junior police officer, who only gave his name as Hussein. "They are not targets and they get a better income."
Emerging from two decades of anarchy, security gains in the past two years have been made largely thanks to African peacekeepers spearheading the fight against al Qaeda-linked al Shabaab rebels.
Western powers, long worried Somalia is a launch pad for militant Islam in east Africa and beyond, fear the nation could slide back into chaos if local forces cannot cement gains.
How to overhaul its security forces will top the agenda at a May 7 conference in London, where Britain and Somalia will seek more international support at a time al Shabaab are weakened and piracy off the Horn of Africa is at an all-time low.
A threat by Ethiopian troops to withdraw from Somalia has raised questions over how the stretched African Union peacekeeping force, known as AMISOM, would be able to plug the gap and highlighted the need for Somalia to build its own capacities.
"Somali armed forces need building up, their police need expanding," Britain's Foreign Secretary William Hague told Reuters when he re-opened Britain's embassy in Mogadishu.
"There are many huge challenges and dangers that remain and the world mustn't think that we have solved all the problems or that its help isn't needed," he said. Washington and Brussels already help pay African troops and Somalia's forces.
Hague said Britain's permanent diplomatic presence signaled London's confidence, although the makeshift embassy's four metal cabins lie behind two blast walls within the fortified airport.
Elected in September, Somalia's President Hassan Sheikh Mohamud said security was "priority number one, two and three".
It is clear why. Mohamud's government depends on the 18,000 or so African troops to survive, and the poorly armed, poorly paid and ill-disciplined military is in no position to take over.
When Ethiopia grumbled AMISOM was not doing enough to take over places its troops had secured and withdrew in a huff from Hudur, near Ethiopia's border, al Shabaab retook the dusty town.
That signaled how swiftly al Shabaab, now largely confined to rural areas, could regroup if any vacuum is left. Diplomats do not expect Ethiopia to leave the African troops stranded.
"It is not in Addis Ababa or anyone's interest to see al Shabaab move back in. Ethiopia clearly understands that," a senior Western diplomat said. "But now we have to tie up what AMISOM is doing and what the Somali National Army is doing."
More a collection of rival militias than a cohesive fighting force, the army lacks sophisticated command structures and has been dogged by soldiers selling off their guns and uniforms.
Frequently that gear ends up in Mogadishu's markets, or in the hands of al Shabaab. More worrying, security officials say, is the number of militants infiltrating the armed forces.
In the April attack on the capital's law courts, the attackers were disguised in official military fatigues.
During the chaotic gun battle, a Reuters photographer saw one group of soldiers point their guns at another group, also in uniform. "Hey stop, who are you? Go back!" They too raised their rifles and replied "We are security forces, and who are you?"
"EAT YOUR BULLETS"
Mistrust is not limited to those in Somalia's forces. Somalia's allies are also wary. The United Nations has partially lifted an arms embargo, allowing in light weapons to help Somali forces, but has maintained a ban on heavy arms.
"They have to visibly demonstrate they can control what they buy and receive before we go further," said a Western official.
President Mohamud and foreign powers say security sector reform must extend beyond the military to the police force which officially numbers around 6,000, nearly all of whom are in Mogadishu - reflecting the government's limited reach.
Plans to add 4,000 more would still leave the national force less than a third the size of New York city's police department.
A government-approved strategic plan for the police force acknowledged some officers have never received any training while others learned their trade as militia loyal to warlords.
One diplomat said foreign assistance to the police force amounted to "life support". More generosity may be required to make it a more professional security operation.
"If only we could get $500 a month, al Shabaab would be extinct," said a second officer who identified himself as Omar. "We would stand in the alleyways day and night and pick them off like ripe bananas."