Somalia's government has declared “all-out war” on the militant group Al Shabab and adopted a multi-pronged counter-terrorism effort which, despite some early military gains, promises to be long and difficult.
The Al Qaeda affiliate was driven from Somalia's major cities a decade ago but retains swathes of countryside, where a coalition of armed groups have joined forces against the insurgents in recent months.
Two clans in drought-afflicted central Somalia sparked a revolt against the extremist group in July that quickly spread across the regions of Hirshabelle and Galmudug.
In September, the Somali National Army and US-trained “lightning” commandos joined the fray in support of these clan militias, known as “macawisley” after the traditional sarongs worn by their fighters.
“The government wants to seize the current momentum and encourage these types of uprisings across Al Shabab-held areas in Somalia,” said Omar Mahmood, a researcher at the International Crisis Group think tank.
Although it is not clear how many combatants are involved in this broad offensive, the fighting has reached an intensity not seen in some years, with unconfirmed reports of hundreds killed in skirmishes.
Sources in Somalia suggest the fighting could have involved 2,000 to 3,000 macawisley. The militants are believed to number 5,000 to 8,000 nationwide.
Supported by US drone strikes and artillery and logistics from the African Union Transitional Force, this combined effort has chased Al Shabab from the provinces of Hiran and Middle Shabelle.
In July, the country's newly elected president, Hassan Sheikh Mohamud, outlined his administration's plan against the militants: hit them militarily, choke off their finances, and counter their hardline ideology.
“The previous policies were militaristic policies … attacking, destroying. But Shabab's problem is more than a military” one, he said.
As a first step he named Mukhtar Robow — one of Al Shabab's founders, who left the movement in 2017 — as religious affairs minister to challenge the militant's violent version of Islam.
In October, the government threatened to revoke the business licences of traders who paid “taxes” to Al Shabab and contributed to the millions they raise through extortion.
Somalia's closest foreign ally, the US, announced $10 million for information that disrupted cash flows to Al Shabab.
Washington recommitted troops to Somalia this year, reversing a decision under former US president Donald Trump.
“The government continues to try to build confidence among the public for them to stand up against the group. We're yet to measure the success of those declarations,” said Samira Gaid of the Hiraal Institute, a Somalia-based security think tank.
Mr Mahmood said the militants may have ceded some territory but are playing a long game.
“Even if they lose in the short term, they will try to find ways to undermine government progress so that they can return.”
The extremists have returned to some areas abandoned in the face of the offensive, and escalated a campaign of bombing.
On October 29, Somalia suffered its deadliest attack since 2017, with a double car bombing in the capital Mogadishu that left 121 dead and 333 injured.
Ms Gaid said the clan uprising was a “huge threat” to Al Shabab and they were adapting accordingly.
“They are responding heavily to try to push it back and to dissuade other clans to join the fight,” she said.
Mr Mohamud told politicians in November that “going back or defeat is not an option”.
But retaking territory is only half the objective.
“The hardest part is holding back that territory” and ensuring people can access services to see the benefit of government rule, Mr Mohamud said.
Past gains against the militants have been eroded by bitter clan rivalries, which Al Shabab exploits to its advantage.
Clan clashes have already been reported in some areas recently liberated from the insurgents.
Mr Mahmood said the government seems keen to expand its operation, but doing so could be fraught.
It is less clear whether the clans would unite against Al Shabab in southern Somalia, where the militants have more influence.
Al Shabab have resisted military aggression for 15 years, and Mr Mohamud himself declared in July that there were “strong arguments” for negotiating with the militants.
“But we are not right now in a position to negotiate with Al Shabab,” he said. “We will, at the right time. We will negotiate with them.”
Ms Gaid said: “It was always clear to the government that negotiation or reconciliation can only happen when you have an upper hand.”
The current offensive “will assist giving the government the upper hand to engage in talks further down” the line, she said.