"Anyone who hurts Ethiopian or Somali troops will be treated as a traitor"
Hussein Mohamed Mohamud, presidential spokesman
Snipers in the city have also killed several people, leaving the streets strewn with dead bodies.
Al Jazeera's Mohammed Adow, speaking from Nairobi, the Kenyan capital, said that many of the dead were civilians who had been wounded and died after they were unable to access medical treatment.
Sporadic gunfire was heard in the north and south of the capital on Friday and Somali government troops patrolled some of the streets, residents said.
Hussein Mohamed Mohamud, a presidential spokesman, said fighters would be treated harshly.
The fighters' aim, Mohamud said, "is to depict the fighting as a war between Ethiopians and [the] Somali people. Far from it."
"The fighting is between government troops and their Ethiopian friends on one hand, and the peace-haters on the other hand and anyone who hurts Ethiopian or Somali troops will be treated as a traitor," he said.
Ban Ki-moon, the UN secretary-general, said on Thursday that sending UN peacekeepers to Somalia was neither realistic nor viable.
Insecurity had prevented the world body from even sending a technical assessment team, he said.
Thursday's clashes began when Ethiopian troops tried to retrieve the body of one of their soldiers who had been killed in earlier skirmishes in the south of the city.
Hundreds of protesters - mainly women and children chanting anti-Ethiopian slogans dragged the body - which had been left behind by fleeing soldiers, through the city for about eight kilometres, witnesses said.
With Ethiopian support, the government drove the Union of Islamic Courts group out of the capital at the start of this year, but it has since faced a campaign of roadside bombings and assassinations.
Aid workers say hundreds of thousands of residents have left Mogadishu this year, fleeing violence that has made delivering humanitarian relief there almost impossible.
About 1.5 million Somalis need emergency aid, the UN says.
Earlier this year, the African Union (AU) agreed to deploy 8,000 troops to replace the Ethiopians, but so far only 1,600 Ugandan soldiers have arrived.