The UN Security Council is considering a UK proposal to lift the arms embargo on Somalia, and allow an African peacekeeping force into the country.
The UN's special envoy on Somalia, Francois Fall, said opposition to the move by Islamists running the capital did not rule out troop deployments.
On Tuesday, some 500 Somali fighters loyal to the last member of an alliance of warlords in Mogadishu surrendered.
Almost 100 people died and 200 were wounded in the two-day battle.
Earlier, the United Nations emergency relief co-ordinator, Jan Egeland, said he hoped UN aid agencies will be able to return to Mogadishu within weeks to provide badly needed assistance to the civilian population.
On Sunday, a team from the UN met leaders of the Islamic militia known as the Union of Islamic Courts (UIC), one of whose leaders is alleged to have links with al-Qaeda.
According to Mr Egeland the militia pledged not to hinder the flow of aid into Mogadishu and instead called on the UN to step up its operations in the city.
"It is certain that security in Mogadishu is better now than it was when controlled by warlords and this seems to be an opportunity for the Somali people and the UN. The UN can now assist the suffering people in Mogadishu and its environs," he said.
The UN is especially keen to help those displaced by the recent fighting between the Islamists and warlords who until recently had been in control of the city since the collapse of the last effective government 15 years ago.
Somalia also has the highest rate of child mortality in the world and the smallest enrolment of children in school anywhere at just 20%.
Overall the UN believes the UIC currently controls just under 20% of the country.
Mr Fall admitted they were concerned that the Islamic militia could ultimately form a hardline government.
But he said his aim was to encourage talks between the more moderate wing of the organisation and the UN-backed transitional government.
Talks between the weak interim government based in Baidoa and the UIC are due to begin in Khartoum on Saturday.