Somali recruits inside Mogadishu have been trained with sticks for guns
A European Union programme to train 2,000 Somali soldiers with the aim of bolstering the transitional government is getting under way in Uganda.
The UN Security Council last year called for international support for organising a new Somali security force.
Somalia's government is battling Islamist militants, thought to have been reinforced recently by al-Qaeda.
The treasury minister told the BBC the government's limited control allowed foreign militants to enter the country.
Somali officials have complained that a long-planned government offensive against Islamist insurgents has been delayed partly because of a lack of training and equipment.
African Union forces have already been training Somali soldiers to defend the transitional government, which controls only small parts of the capital, Mogadishu.
Col Ricardo Gonzalez Elul, the Spanish commander of the EU training mission (EUTM Somalia), received clearance to launch the mission on Wednesday, while the physical training begins in May.
He told BBC World Service the Somali soldiers would be trained in mine awareness and fighting in built-up areas, to prepare them for conditions in Mogadishu.
They would be also be given communications and medical training.
Training equipment would be supplied mainly by Uganda and the US while the soldiers' eventual equipment would be provided both by the AU and EUTM Somalia, he said.
Uganda provides many of the troops for the African Union Mission to Somalia and was one of the first countries to offer its facilities for training.
Asked about the risk of EU-trained soldiers defecting to the militant side once back in Somalia, Col Elul said there were "strong initiatives" in place including an "reintegration and monitoring programme" in Mogadishu.
Abdulrahman Othman, Somalia's treasury minister, told BBC World Service he had received intelligence reports of al-Qaeda militants arriving from Yemen to reinforce the al-Shabab militant group.
He suggested that militants were leaving Afghanistan and Iraq because of the strong military forces deployed against them, and were coming to Somalia instead "because they believe they can do what they like there".
"We need a functioning government to stop al-Qaeda and extremist groups hiding in our country," he said, appealing for international assistance.