Somalia is a direct threat to the UK's security because it is one of the "most dysfunctional countries in the world", International Development Secretary Andrew Mitchell has warned.
Mr Mitchell has also announced that Britain will provide more than 9,000 tonnes of food supplies and medicines to drought-ravaged regions in the Horn of Africa this Christmas.
He told BBC Radio 4's Today programme that Somalia was a threat to the UK's security.
"It is a place from which emanates piracy, drug running, this weight of people trying to come to a more attractive economic shore," Mr Mitchell said.
"There are probably more British passport holders engaged in terrorist training in Somalia than in any other country in the world.
"This is not only about saving the lives of huge numbers of vulnerable babies and children, it is also about doing the right thing to promote British security."
Mr Mitchell ruled out "putting boots on the ground" in Somalia but said the Government was involved with the United Nations African Union force, which is clearing terrorists out of the capital city of Mogadishu.
He said the aid package would be directly targeted at 5,000 young children in "very grave danger" but insisted there were some "glimmers of hope" because three of the six regions hit by famine were no longer classed as acute.
Britain's aid package to the Horn of Africa this Christmas includes more than 5,000 tonnes of supplementary food and oil for 199,000 children and mothers in Ethiopia.
Around 300,000 children in Mogadishu and Somalia's border area will receive more than 2,000 tonnes of supplementary food.
Food vouchers will be delivered to 200,000 Kenyans and 1,681 tonnes of oil, corn soya blend and dried milk will go to 108,000 children and 26,000 mothers in Kenya.
Mr Mitchell said Britain had provided emergency aid to millions of people during the past six months.
"In many cases, this has been the difference between life and death," Mr Mitchell said.
"Millions across the region remain in danger and will face a fight for life in the New Year as they struggle to recover from the drought."
Between 50,000 and 100,000 people have died from drought-related causes, over half of whom were children under five, Government estimates based on UN data show.