Ethiopian and government forces responded by shelling the capital's heavily populated Bakara market.
Many of those injured had been praying in a mosque near the market when the fighting erupted.
Civilians have borne the worst of the casualties during battles between opposition fighters and Ethiopian forces, who invaded in late 2006 to help the then-isolated transitional government remove the Union of Islamic Courts from control of Mogadishu and much of southern Somalia.
At least 6,000 people died in the conflict in the last year alone.
Separate fighting between the remnant Islamic Courts fighters and local clan militia left about 10 people dead and another 20 wounded in Somalia's southern port town of Kismayo.
Somalia has lacked an effective government since Mohamed Siad Barre, the country's former ruler, was removed from power in 1991 by clan leaders.