Nairobi - Expelled from a string of strategic towns, cut off from revenue sources and struggling for its survival, Somalia's Islamist militant group al-Shabaab is steeling for an anticipated assault on its last bastion by Western-backed African forces.
But while the capture of the southern port and militant stronghold of Kismayu in coming weeks could weaken the al-Qaeda-linked rebels, it is unlikely to deliver the knock-out blow hoped for by Mogadishu and its allies.
Kenyan forces operating in Somalia seized the southern rebel stronghold of Afmadow in late May. This opened the way for what Kenyan Prime Minister Raila Odinga said would be a "final onslaught" on Kismayu, Somalia's second biggest city which is a hub for al-Shabaab and a main base for its foreign fighters.
Kismayu would be taken by August, Odinga said this month.
But some regional diplomats feel this target is over ambitious. There are fears too a wounded al-Shabaab will simply redeploy from Kismayu and hit back with guerrilla raids and urban bombings, disrupting efforts to end two decades of violence in the Horn of Africa state.
"The fall of Kismayu might hurt the rebel economy, but they will launch more attacks," said Hassan Farah, a shopkeeper in the coastal city. He said the dense forest surrounding the port would be an easy hiding ground for the rebels.
"Al-Shabaab will not go far, even if they lose Kismayu."
Likely to pull back
The diplomats argue that African Union peace keepers deployed against al-Shabaab need to consolidate their numbers in other recently won urban areas, before the assault on Kismayu.
There are also questions about whether the rebels, wary of possible heavy casualties and an expensive battle, will dig in and defend the densely-populated port that has served as a financial lifeline, or melt into the jungle hinterlands.
"Kismayu has a strong administration under al-Shabaab. The markets are busy and there is security," said Farah. "I know of many residents who are ready to fight alongside al-Shabaab."
Natznet Tesfay, a Somalia expert from Exclusive Analysis, said al-Shabaab would likely pull back and turn to guerrilla-style hit-and-run sabotage attacks, as they did in Mogadishu after they were expelled by African troops.
"We are more likely to see a lull in the intensity [of] al Shabaab activity and possibly a rebranding rather than the group's collapse," Tesfay said.
That, Tesfay said, could mean the Islamist movement splitting into splinter groups, between those motivated by a nationalist agenda to impose strict sharia law on the country, and those motivated by more global jihadi sentiments.
An al-Shabaab suicide bomber on Saturday attacked a government base outside the Somali capital in Afgoye, a town captured at the end of May by Somali government and African Union troops.
This underscored the security challenge facing the government and its allies despite their recent successes.
The market town was a cash cow for al-Shabaab which extorted taxes on goods destined for Mogadishu, compounding the financial blow the insurgents suffered last August when they were driven from Mogadishu's Bakara market, the capital's economic heart.
In a sign of the mounting pressure on the group, a steady trickle of defections points to low morale within rebel ranks. Defectors tell of al-Shabaab footsoldiers demoralised by battle fatigue, meagre salaries and a lack of sophisticated weaponry.
Mogadishu's Western allies are keen to capitalise on the group's troubles. Washington this month offered multi-million dollar bounties for information leading to the location of seven key militant commanders.
But talk of a "tipping point" is premature, analysts say.
"While there are clearly splits within al-Shabaab, divisions which will be exacerbated by the loss of two of the most significant towns still under its control, al-Shabaab has always shown a remarkable resilience," said J Peter Pham of US think-tank the Atlantic Council.
"In fact, there is already evidence that the group has laid the foundations for its eventual resurgence after the current setbacks."
Intelligence picked up by security agencies, research by the United Nations and accounts by Muslim Kenyans suggests al-Shabaab is mentoring a new and increasingly multi-ethnic generation of militants.
The concern is that an increasingly cornered al-Shabaab may attack more widely in the region, a capability demonstrated by a double bombing in Uganda in 2010 that killed 79 people.
Under pressure in south and central Somalia, diplomats say al-Shabaab is moving combatants to the semi-autonomous Puntland territory that is separated by only a narrow neck of water from Yemen, a hotspot in the US-led war against militant Islam.
"Obviously it's of concern not just because it could further undermine stability in ... a more secure and stable area, but also because of a potential link up to AQAP [al-Qaeda in the Arabian Peninsula]," said a senior diplomatic source who follows Somalia.
Pockets of support
Al-Shabaab formally joined al-Qaeda's ranks in February. The diplomat said there were definitely contacts - "facilitators" from AQAP or Somalis in Yemen who have ties to both groups going back and forth. But there had been little visible evidence so far of more strategic co-ordination or active combined plotting.
Puntland's authorities have warned of growing militant numbers in the rugged mountains south of Bossaso, an area that would provide hideouts and access to ports to bring in weapons, ammunition and foreign jihadists.
The rebels retain pockets of support in areas under their control, despite the sometimes draconian rules they have imposed that include amputation of criminals' limbs and banning of music and watching football.
In the former rebel stronghold of Baidoa, trader Fatuma Bashir lamented the failure of Ethiopian and Somali soldiers now there to prevent recurring militant grenade attacks as the city awaits the deployment of more than 2 000 AU peacekeepers.
"We don't want al-Shabaab back, but life has not changed for the better after the seizure of the town," Bashir said. "Al-Shabaab used to take tax from our sales in the city. Now they tax our commodities outside Baidoa," she said.
Two decades after Somalia's civil conflict erupted, the central government still exerts little meaningful control beyond the capital.
Bandage on a gaping wound
Security analysts say al-Shabaab could take advantage of power vacuums if concrete political administration and reform does not keep pace with military advances.
"All the attention is on getting rid of al-Shabaab. Then what? There are no institutions ... to implement the rule of law," said London-based Somali analyst Hamza Mohamed.
"They are not solving the issues that gave rise to al Shabaab. They're just putting a bandage on a gaping wound."
Somali politics has long been driven by feuding clans battling to safeguard their hold on the accompanying financial spoils. Many Somalis remain unconvinced their leaders are committed to lasting reform and peace.
David Shinn, a former US ambassador to Ethiopia, said the political landscape in Somalia had changed through the conflict for the "foreseeable and possibly permanent future".
"Militant Islam, or at least Salafi ideology, is here to stay just as we are seeing in Egypt, Tunisia, Libya and to a lesser extent Morocco," Shinn said.