Al-Shabab wants to impose a hard-line interpretation of Islamic law
Hundreds of Somali insurgents loyal to Islamist group al-Shabab have poured into Mogadishu with artillery and trucks, witnesses say.
Residents have been fleeing the capital for days amid a widespread belief that the rebels and government forces are on the cusp of a serious showdown.
Meanwhile, at least 16 people were reported killed in skirmishes that have become almost daily in the city.
Insurgents already control much of Mogadishu and southern Somalia.
However, the government has recently promised to launch an offensive to take control of the country.
The BBC's Mohamed Olad Hassan, who is in Mogadishu, says the rebels have promised to resist the government.
He says the war propaganda from both sides has spread fear throughout the city.
Wracked by violence
The insurgents coming in from the south will reinforce an already numerous and organised group of fighters in Mogadishu.
On Wednesday, African Union peacekeepers fired shells into militant-controlled areas, and our correspondent says at least 10 civilians were killed.
In a separate incident, police said six government troops had been killed after a gun battle with insurgents.
One of the many fleeing his home on Wednesday was father-of-three Mohamed Isa Abdullahi, who told the AFP news agency neither side in the conflict cared about civilians.
"The government has vowed to retake the city, rebels are going to stick to their bastions and the civilians are going to be the only victims, as always bearing the brunt of the war," said the 39-year-old.
Gunfights and shelling are common in the city - and civilians are killed by both sides.
The transitional government - backed by African Union troops and UN funds - controls only a small part of the capital.
The rest of the country is ruled by warlords, al-Shabab or other Islamist militias.
Somalia has been wracked by violence for much of the past 20 years. It has not had a functioning central government since 1991.