The defeat of Islamic State in its de facto capital Raqqa may only be the start of a wider struggle by the United States to contain any insurgency launched by the militant group and to stabilise the region, as Washington struggles to define a comprehensive strategy in Syria.

US-backed militias declared victory over Islamic State in Raqqa on Tuesday, raising flags over the last jihadist footholds after a four-month battle. The Sunni militant group often referred to as ISIS, overran Raqqa in January 2014, seizing control from rebel factions opposed to the rule of Syrian President Bashar al-Assad.

"While recapturing Raqqa is important symbolically, talk about almost a pyrrhic victory," said Bilal Saab, a senior fellow at the Middle East Institute. "Addressing the economic, political grievances of the Sunnis so that another ISIS doesn't come about will be as important as the military fight."

Raqqa was the first big city Islamic State captured, before its rapid series of victories in Iraq and Syria brought millions of people under the rule of its self-declared caliphate, which passed laws and issued passports and money.

Islamic State has lost much of its territory in Syria and Iraq this year, including its most prized possession, the Iraqi city of Mosul. In Syria, it has been forced back into a strip of the Euphrates valley and surrounding desert.

Raqqa
In picture: A civilian prays after she was rescued by fighters of Syrian Democratic Forces from the stadium after Raqqa was liberated from the Islamic State militants in Raqqa, Syria, October 17, 2017.Reuters

Middle East analysts said that among the wide array of problems exposed after Islamic State's ouster from Raqqa were where to find money to help rebuild the shattered city, how to support fledgling local government in the face of a likely insurgency and how to keep Assad, backed by Iran and Russia, from trying to regain control.

"The real challenge is that ISIS will turn into a vengeful ghost, will try to stalk and to wreak havoc on the post-conflict security and governance and administration in order to undermine the US and its partners," said Nick Heras of the Centre for a New American Security.

A US State Department official said Washington remained committed to a peace process in Geneva and supported the "broadest possible group of Syrian representatives in those discussions."

The official said the United States and allies would continue to provide humanitarian assistance and support efforts to stabilise areas freed from Islamic State rule "to include continuing the removal of IEDs and other explosives ... restoring basic services and refurbishing schools."

The official said the US goals included "supporting local governing bodies that are representative of the area, civilian-led, and credible in the eyes of the populations."

Assad's use of force to crush an initially peaceful uprising against his family's more than four-decade rule triggered the country's civil war in 2011. The conflict helped create a vacuum that Islamic State eventually filled by seizing parts of Syria. Russia stepped in with military support for Assad in 2015.

"The greatest challenge for Raqqa and local Syrian partners that are trying to rebuild Raqqa is the ambiguity of Trump administration Syria policy," Heras said.

Raqqa
In picture: Syrian Democratic Forces (SDF) fighters ride atop of military vehicle as they celebrate victory in Raqqa, Syria, October 17, 2017.Reuters

"A signal needs to be sent that the US intends to keep a residual force in the areas that it has conquered from ISIS in order to oversee the stabilisation mission and to have the broader, publicly unstated aim, to constrain Iran's ability to reconquer all of the country in the name of Assad," he said.

Several analysts said the United States does not appear to have a durable strategy to stabilise the region, let alone to revive the moribund UN talks in Geneva aimed at ending the civil war.

"We've captured and lost cities before," said Senator Ben Sasse, a Republican. "This victory underscores the need for a comprehensive Syria strategy."

A US official who spoke on condition of anonymity said: "If the Russians truly want to ... have something that will really put Syria back together, we will see if they are willing to return to the Geneva process."

Saab, of the Middle East Institute, suggested U.S. influence in Syria may be too slight to shape events.

"Our investment has always been and will always be quite limited," he said. "We have ceded the terrain to Russia and the Iranians and it's almost too late now, for us, to get involved effectively, you have to have some skin in the game."