Somalia's al Shabaab rebels withdrew from their last major bastion of Kismayu overnight, the group and residents said, a day after Kenyan and Somali government forces attacked the southern port.
The loss of Kismayu will deal a major blow to the al Qaeda-linked movement, weakening morale and depriving it of revenue, but is unlikely to mark the end of its five-year rebellion.
The insurgents, who once controlled large swathes of the lawless Horn of Africa country, have been turning to guerrilla-style tactics, harrying the country's weak government with suicide bombings and assassinations.
"We moved out our fighters ... from Kismayu at midnight," al Shabaab spokesman, Sheikh Ali Mohamud Rage, told Reuters on Saturday.
Rage threatened to strike back. "The enemies have not yet entered the town. Let them enter Kismayu which will soon turn into a battlefield," he said.
Locals confirmed the militants had pulled out under the cover of darkness but said the Kenyan troops, fighting under an African Union peacekeeping force's banner, and Somali soldiers were still camped on the city's outskirts.
There were reports of looting in some areas of the city.
"Al Shabaab has not perished, so the worry is what next," said local elder Ali Hussein.
One man who was loudly celebrating the departure of al Shabaab fighters from the city was shot dead by two masked men, residents said.
"These masked men came from behind him and hit him with several bullets right in the head... Now we are terrified, everyone in Kismayu is dumb silent. We are afraid to talk on the phone outdoors," said Halima Nur, a mother of three children.
Al Shabaab, which formally merged with al Qaeda in February, has been steadily losing its footholds under sustained pressure from African Union peacekeeping forces (AMISOM) and Somali government troops for the past year.
The rebel group, which counts foreign al Qaeda-trained fighters among its ranks, is seen as one of the biggest threats to stability in the Horn of Africa. It has received advice from al Qaeda's leadership, counter-terrorism experts say.
Residents said the fighters who had abandoned Kismayu had moved to the jungles that lie between Kismayu and Afmadow as well as to other towns north of the port city like Jamame and Kabsuma.
Kenyan military spokesman Col. Cyrus Oguna said his force was still trying to check whether al Shabaab had withdrawn, and would move into the city if the rebels did not put up resistance.
Al Shabaab has pulled out of a number of urban areas including the capital, Mogadishu, in recent months under pressure from advancing African Union forces. But their continuing guerrilla attacks still pose a big challenge for newly-elected President Hassan Sheikh Mohamud.