Al-Qaeda-linked Somali militants vowed Saturday to intensify the war against government and African Union troops, despite the fall of their key stronghold of Afgoye, the latest in a string of military losses.

“God willing we will continue the war and we will win the battle without doubt,” said Sheik Abdiaziz Abu Musab, spokesman for the hardline Shebab, a day after AU and Somali troops entered Afgoye, a former strategic rebel base.

The bulk of Shebab fighters left ahead of an advancing column of hundreds of AU and Somali government troops, who launched a long-awaited assault on the town, which controls key roads some 30 kilometres (18 miles) northwest of the capital Mogadishu.

The loss of Afgoye is another major blow for the insurgents who have been on the backfoot for several months, although Shebab fighters said it was a tactical retreat, and boasted of having “killed many soldiers in the recent fighting.”

“The mujahedeen fighters tactically withdrew from some positions but that does not represent a defeat,” Musab added. “We have already cut their supply routes and inflicted heavy losses on the enemy.”

More than 400,000 people were living in the Afgoye region at the start of the year — the world’s largest concentration of displaced people — according to the United Nations.

Impoverished settlements of plastic and rag huts crowd an area that was last year gripped by famine. The hope is that its capture will allow access by aid workers until now banned from helping the people due to draconian orders from the Shebab.

Sporadic gunfire and occasional artillery shelling was reported early Saturday in the Elasha and Sinka-Dehr districts, between Afgoye town and Mogadishu, with government army commanders saying they had surrounded diehard Shebab fighters.

“The troops are in full control of the whole Afgoye corridor, but there are a few desperate militants stranded near Elasha, and soon they will be eliminated if they fail to surrender,” said Colonel Muktar Mohamed, a Somali military commander.

Somali army officials also rejected the Shebab’s claims of heavy casualties.

Long lines of civilians continued to flee towards Mogadishu despite security restrictions on the roads, witnesses said.

“There is some gunfire and shelling but not major fighting,” said Hassan Mohamed in the Afgoye area. “The remaining families are moving from the area today even though transport movement is limited.”

The UN refugee agency reports over 9,000 civilians have fled since the assault on Afgoye began, although aid workers fear that more people not included in that assessment may have fled into the bush.

Officials hope that the capture of Afgoye will deny the Shebab a base from which to continue its recent spate of guerrilla attacks on the capital.

Many fighters had shifted to the area after pulling out of fixed positions in Mogadishu last August and launching a campaign of suicide and grenade attacks.

Afgoye’s capture will “neutralise the area of operation and preparation” of guerrilla attacks, the UN special representative for Somalia Augustine Mahiga said Friday, calling its capture a “a significant military breakthrough.”

The Shebab’s withdrawal from Afgoye without fierce resistance follows a pattern of retreat, including a pull-out from positions in Mogadishu last August, and their abandonment of the key city of Baidoa to Ethiopian and Somali troops in February.

However, the fighters have since launched a brutal campaign using guerrilla tactics including suicide, grenade and mortar attacks, and analysts warn they remain a serious threat.