Somalia's interim government has agreed to hold talks with the Islamic courts that control the capital.
A government official said they would hold talks early in August in Khartoum without preconditions, after President Abdullahi Yusuf met a UN envoy.
Talks to try and avert conflict between the two sides broke down last week.
The Union of Islamic Courts has vowed to expel Ethiopian troops who are deployed in Baidoa to assist the weak transitional Somali government.
UN envoy Francois Fall is expected to head to Mogadishu from Baidoa to meet leaders of the UIC.
"We will go to Khartoum without any preconditions," the president's chief of staff, Abdirizak Adam, was quoted by reporters as saying.
The talks were due to begin at the weekend, but the government refused to attend and the UIC delegates walked out in protest at the presence of Ethiopian troops in Somalia.
On Monday, thousands of Somalis staged a rally in Mogadishu calling on Ethiopian troops to leave.
The demonstrators burnt Ethiopian flags at a protest in the capital.
As well as the government's Baidoa base, Ethiopian troops have also been seen in another central town, Wajid.
Ethiopia and the transitional government have refused to confirm Ethiopian troops are on Somali soil.
Islamic leader Sheikh Sharif Sheikh Ahmed told the rally that forces loyal to the Islamic courts were ready and would be allowed to fight Ethiopians when appropriate.
"We are talking to the international community to avoid serious bloodshed and we are urging the Ethiopians to withdraw from Somalia. Patience has its own limitations," AFP news agency quoted him as telling the crowd.
Talks held in Sudan between the UIC and the transitional government - which correspondents say has little authority outside Baidoa - have been suspended.
Ethiopia, a long-term ally of President Abdullahi Yusuf, has warned the Islamic courts not to make any further military advance on Baidoa.
In recent weeks the Islamic courts have wrested control of much of southern Somalia from many of the warlords who divided up the country into rival fiefdoms following the overthrow of Siad Barre in 1991.
They appear to be making considerable progress in imposing law and order in the capital.