Ethiopian forces are to remain in Somalia to ensure stability after the defeat of Islamist militias, but splits have emerged over when they may leave.
Ethiopian-backed troops took the capital, Mogadishu, a few days ago
The prime minister of Somalia's fragile interim government, Ali Mohamed Ghedi, says that heavily-armed soldiers from Ethiopia would be needed for months.
But Ethiopian Prime Minister Meles Zenawi told MPs that he hoped his forces could withdraw within two weeks.
The two-week advance ended a six-month Islamist occupation of south Somalia.
Kenyan forces are on the Somali border, to intercept fleeing Islamist militias, following the fall of Kismayo, their last stronghold, on Monday.
Two top Islamist leaders are reported to have been seen some 100km from Kismayo with dozens of armed pick-up trucks. Ethiopian forces are said to be in pursuit.
Somalia's weak interim government wants Ethiopian forces to remain in the country until peacekeepers deploy, as they have few well-trained troops and are poorly placed to maintain law and order without help.
But the presence of Ethiopian troops on Somali soil could also damage the government's attempts to win widespread support, the BBC's Karen Allen says.
Mr Ghedi said Uganda and Nigeria have offered to send contingents of troops, but details about who would fund such a force still need to be thrashed out.
He told the BBC that Somali troops were ready to take on more responsibility for security, but at first they would need help from the Ethiopians.
"It depends how the stabilisation and pacification takes place. It can be weeks, it can be months - but not more," he said.
He appealed for humanitarian aid and urged the AU to send peacekeepers soon.
On Monday, Mr Ghedi set a deadline of Thursday for all Somalis to hand in their weapons, but this has reportedly borne little fruit so far in the capital, Mogadishu. He has also offered an amnesty to fleeing Islamists if they give themselves up.
Mr Meles said the Ethiopian operation in Somalia had achieved most of its objectives and that his troops would withdraw at the earliest opportunity.
"We will go out as soon as possible. It could be in two weeks in order to achieve stability," he told MPs.
But speaking in parliament, Mr Meles said there was still a need to mop up Islamic fighters and to ensure that Somalia does not return to the chaotic rule of the warlords who ran the country after the fall of the last effective government 16 years ago.
"It is up to the international community to deploy a peacekeeping force in Somalia without delay to avoid a vacuum and the resurgence of extremists and terrorists," he told MPs.
He also warned that the UIC may now engage in an insurgency.
The BBC's Amber Henshaw in Addis Ababa says many analysts fear the situation could mirror that in Iraq or Afghanistan - a quick victory followed by protracted fighting by insurgents.
Ethiopia accuses the UIC of harbouring al-Qaeda militants. This is denied by the militia.
Kenya police are questioning 10 people believed to be senior UIC members who fled across the border at the weekend.
Ethiopian aircraft and artillery are backing Somalia's government
They are currently being held at the Garrissa police division in northern Kenya.
Kenyan President Mwai Kibaki has met key security chiefs. He has also called for a summit of East African countries to discuss the situation.
Meanwhile, the United Nations humanitarian coordinator for Somalia has expressed concern about Kenyan attempts to seal the border at the request of the Somali transitional government.
The official, Eric La Roche, told the BBC that most of those fleeing the fighting in Somalia were women and children, and that the number crossing the border had been reduced to a trickle in recent days.
Meanwhile, European members of the Somali Contact group are due to meet in Brussels on Wednesday to discuss how Europe can help peace efforts in Somalia.
The German foreign minister has called the meeting, which will bring together Britain, Italy, Sweden and Norway.
The UN estimates that about 30,000 people have been displaced during the fighting, and casualties have been high.