Ethiopian soldiers have the been the target of insurgent attacks
Ethiopia is prepared to withdraw troops from Somalia even if the interim government is not stable, Ethiopian Prime Minister Meles Zenawi has said.
Ethiopia invaded its neighbour in 2006 to oust an Islamist militia and re-install the transitional government.
He told the UK's Financial Times paper that financial pressures had to be taken into account and said the commitment was not open ended.
The withdrawal of Ethiopians is a key demand of the Islamist insurgents.
Al-Shabab, the radical wing of the Islamists who controlled much of Somalia in 2006, has refused to recognise a recent UN-brokered agreement the interim government has signed with an opposition group including a top Islamist leader.
It has demanded that Ethiopian troops leave Somalia before any ceasefire is considered.
Somalia has experienced almost constant civil conflict since the collapse of Mohamed Siad Barre's regime in January 1991.
"The operation has been extremely expensive so we will have to balance the domestic pressures on the one hand and pressures in Somalia on the other and try to come up with a balanced solution," Mr Meles told the Financial Times.
The Ethiopian prime minister has been struggling to reconcile a rift within the Somali interim government.
The Somalia president and prime minister fell out over the sacking of the mayor of the capital, Mogadishu, which has experienced the brunt of the violence.
The BBC's Elizabeth Blunt in the Ethiopian capital, Addis Ababa, says Mr Meles's remarks may partly have been intended to concentrate the minds of the Somali leadership by pointing out that if Ethiopia really did lose patience it could pull out and leave them to their own devices.
He did express the hope that a replacement force would be fully or nearly fully deployed before the Ethiopian troops left.
But he added that given past practice, Ethiopia could never be sure when the African Union could deploy in any meaningful sense.
He also blamed the West for the continuing instability, saying it had offered lukewarm political and financial support for an African Union peacekeeping force.
"We didn't anticipate that the international community would be happy riding the Ethiopian horse and flogging it at the same time for so long," he said.
So far only about 2,200 of a planned 8,000-strong AU peacekeeping force have been sent to Somalia.