Residents fled their homes on Sunday as militia prepared to attack Balad, which is controlled by a member of the anti-terrorism warlord coalition that has been fighting forces loyal to Islamic courts.
"Balad town is empty, people have taken off," resident Hassan Muke told Reuters by telephone.
The town is an a strategically important position 30km north of the Somali capital Mogadishu.
Elsewhere, officials said international and local aid workers based outside Mogadishu were leaving Somalia because they feared that the fighting would spread to other regions.
Islamist fighters have, in the last few days, made steady gains, seizing villages near Balad, but militia loyal to Muse Sudi Yalahow, a warlord and government minister who controls the town, have vowed not to give up ground without a fight.
Islamist forces have taken over the villages of El Iffid, Ali Yaale, Garas Bintow and a military camp of Hiilweyne, 7km from Balad town, witnesses said.
Residents said the national security minister, Mohammed Qanyare, and his heavily armed forces left their base in Daynile in Mogadishu on Saturday night.
They were believed to have moved towards Balad to offer support to Muse Sudi, who is also the commerce minister in Somalia's transitional government.
"There are fears that the war will start again because the militia are reorganising themselves," one analyst said.
Heavy machine-gun battles have broken out in recent days after a period of relative calm in clashes between Islamic warlords and secular bands. The latter are widely believed to be supported by the United States.
Washington has not commented except to say that it welcomes support in its so-called "war on terrorism".
Residents say the latest fighting has involved some of the worst violence ever seen in Mogadishu.