Ahmed later joined the government after signing a UN-brokered peace deal and is now battling former allies from the al-Shabab and Hizbul-Islam groups, which have vowed to topple his government.

Border security

Al Jazeera's Mohammed Adow, reporting from Nairobi in Kenya, said that it remained to be seen what action Ethiopian forces would take.

"Ethiopia has got a big stake in what is going on in Somalia because it believes that its security would be threatened if the Islamist militias, such as al-Shabab, take over Somalia," he said.

In depth


 Profile: Sharif Ahmed
Timeline: Somalia
 Inside Story: What next for Somalia
 Video: Foreign fighters 'invade' Somalia
 Riz Khan: Somalia - From bad to worse
Restoring Somalia
A long road to stability
Al-Shabab: Somali fighters undeterred
 Somalia at a crossroads
 Somaliland: Africa's isolated state

"But I doubt it is sending its forces into Somalia, unless it gets its actions sanctioned by the United Nations, which would take weeks, if not months.

"Ethiopia's return to Somalia might be about securing its borders rather than heading to Mogadishu."

Nur said that he had been forced to call for help after the opposition fighters had been bolstered by hundreds of foreigners.

"We have a state of emergency in this country today because foreign fighters from all over the world are fighting the government," he said.

Nur also said that an al-Qaeda operative from Pakistan was directing the fighting and was based in the Sanna neighbourhood of Mogadishu, close to the presidential palace.

He did not provide any evidence for his claims.

The United States has previously said that the al-Shabab movement, which has vowed to topple the government, is supported by al-Qaeda.

Mohamed Sheikh Nor, a journalist in Mogadishu, told Al Jazeera that there was likely to be heavy fighting if the Ethiopian troops reached the central and southern areas controlled by the armed opposition groups.

"There will be confrontations and clashes," he said.

"Some of the politicians in the government say, however, that the Ethiopian troops can help set up the institutions of the government."

Al-Shabab and Hizbul-Islam launched an offensive against government forces on May 7 and more than 300 civilians are believed to have been killed in the resulting fighting.

Heavy fighting

There were reports of heavy fighting on Saturday in Hamarweh, another suburb near the presidential palace, after clashes in the northern Karan district overnight.

"I saw heavily armed Islamist fighters advancing onto Hamarweh area. They are firing mortar shells and government forces are retaliating," Warsameh Ahmed, a Mogadishu resident, told the AFP news agency.

"Kenya had been saying that it will attack the mujahidin of al-Shabab for the last four months. If it tries to, we will attack Kenya and destroy the tall buildings of Nairobi"

Sheikh Hasan Yacqub,
al-Shabab spokesman

"It seems they are close to taking control of the area."

Three high-profile government officials - the security minister, an MP and a senior police officer - have been killed in recent days.

More than 4,300 Ugandan and Burundian soldiers are already deployed in Somalia as part of an African Union (AU) force and are charged with protecting strategic sites such as the presidency, the port and the airport.
  
But the troops are not allowed to fight alongside government forces and are authorised only to retaliate if they come under direct attack.

Kenya said on Friday that it would not sit by and allow the situation in its neighbour to deteriorate further as it would destabilise the rest of the region.

It said that the AU was committed to increasing its commitment, but al-Shabab had warned against any foreign intervention.

Sheikh Hasan Yacqub, an al-Shabab spokesman, said in the southern port city of Kismayo: "Kenya had been saying that it will attack the mujahidin of al-Shabab for the last four months.

"If it tries to, we will attack Kenya and destroy the tall buildings of Nairobi."

Thousands of residents fled Mogadishu on Saturday, many of them joining the estimated 400,000 people who are living rough along the Afgooye corridor, about 20km south of the capital.