Somali sources say at least 17 people have been killed and 61 more injured in fighting between government forces and opposition fighters.
Government forces fired mortars on Thursday at fighters said to have been positioned in the busy market of Bakara in the capital Mogadishu, the sources said.
"We admitted 61 wounded people from yesterday's shelling," a doctor at the Medina (City) Hospital told the German Press Agency DPA.
"Three of them died inside the hospital during treatment."
Al-Shabab group, which recently announced it was joining al-Qaeda's international jihad, is pushing to oust the weak Western-backed government and controls much of Mogadishu and south-central Somalia.
Civilians are often caught in the crossfire, and human rights organisations and aid agencies have called on both the government and armed groups to minimise civilian casualties.
Ali Muse, the head of Mogadishu's ambulance service, told DPA that 11 civilians died, while other witnesses said that another three had been killed.
The shelling came as forces built up in Mogadishu in advance of an expected government assault on al-Shabab's positions.
Witnesses saw hundreds of heavily armed groups pour into Mogadishu on Wednesday, while the government was also building up its forces as it tries to extend its weak influence in Mogadishu.
Thousands of civilians have fled the city over the last few days in anticipation of heavy fighting.
The Horn of African nation has been embroiled in chaos since the 1991 ouster of Mohamed Siad Barre, the president, and the subsequent US invasion in 1992.