Raqqa has fallen. The Syrian city’s liberation has decimated the dream of a global “caliphate” entertained by a dangerously deluded bunch of individuals who caused so much death and mayhem in the Middle East and beyond.

From the sandy plains of Syria and Iraq to the mountains of Afghanistan and the jungles of Southeast Asia, it is clear that Daesh (the self-proclaimed Islamic State of Iraq and the Levant) as a military force on the ground, is finished. Like the fall of Mosul, the collapse of Daesh in Raqqa is of symbolic importance. In both cities, the terrorist group presented its idea of a society to the world. It had exercised total control over the civilian population and established a reign of terror.

It was in Raqqa’s central square that Daesh carried out its brutal executions, and showcased it for the world to see. It staged rallies and parades in Raqqa after its numerous and lightning victories in 2014. Its collapse there will have a significant and demoralising impact on its remaining members and supporters.

Now that the fighting is over, it is important to avoid regional and local tensions getting in the way of the rebuilding of the city and of its broken society. The people of Raqqa have lived through a nightmare for the past three years.

On the one hand was the brutal Daesh rule. On the other, the relentless aerial bombing by the international coalition, which led to considerable civilian casualties. The fact that the US-allied Syrian Democratic Forces (SDF) is primarily a Kurdish militia that has liberated a largely Arab city is not lost on the people.

Besides, the Raqqa operation has also caused alarm in Ankara. Turkey takes a dim view of potential Kurdish influence in the city, and indeed in the so-called Rojava region of Syria, not far from Raqqa.

And then there is the Syrian regime, supported by Russian jets and Iran-backed militias, which is waging its own air and ground campaign in Syria’s east.

What is needed now is a solution to problems that cannot be fixed by gunfire and air strikes. As long as a solution is not found to the political, religious and ethnic disputes that afflict societies like Syria and Iraq, extremism will raise its head again. We have seen this happen multiple times in the region. Only when the civilian population feels it has a stake in the country, and only when governments treat all citizens equally and provide them with the chance to make their lives better, will countries like Syria and Iraq see peace and stability.