THE residents of Derna, a sleepy port in eastern Libya, awoke to important news on October 5th: at a rally in the main square a powerful local militia, the Shura Council of Islamic Youth, pledged allegiance to Islamic State (IS), the jihadist group that controls swathes of distant Syria and Iraq, and to its self-proclaimed caliph, Abu Bakr al-Baghdadi. A parade of masked men in heavily armed vehicles honked through the streets to celebrate Derna’s new status as an “emirate” within Mr Baghdadi’s pan-Islamic caliphate.

Three years after the overthrow of Muammar Qaddafi, Libya is in the throes of full-scale disintegration. Yet the collapse of Libya’s state no longer seems an anomaly. Across the Middle East non-state actors increasingly set the agenda, challenging governments, overthrowing them or prompting them to retrench behind increasingly repressive controls.

In Yemen an insurgent group known as the Houthis last month captured the capital, Sana’a, and dictates policies to the rump government, which is also struggling against al-Qaeda; jihadists are blamed for bombings and executions that killed scores this week. Over the three years of Syria’s civil war, the “government” forces battling against myriad rebel groups have increasingly devolved from a formal army into an amalgam of loyalist village-defence units, mafia-like shabiha gangs, and Shia militiamen imported from Iraq and Lebanon. Lebanon’s own army, long outgunned by the country’s Shia militia, Hizbullah, has itself often acted more like a militia than a formal military force: one unit recently burned down a Syrian refugee camp and beat up its residents after attacks on soldiers by Syrian rebels.

The three-week-long battle for Kobane, a Kurdish enclave along Syria’s border with Turkey, has captured the headlines as a test for the American-led coalition fighting IS (see article). Yet the battle on the ground is one between militias, not armies. Similarly in Iraq, the counter-attack against IS’s shock advance towards the capital, Baghdad, has been led not by the Iraqi army but by local tribesmen, Shia party militias and Kurdish peshmerga. And even these Kurdish fighters, despite the semblance of unified command by the autonomous Kurdistan Regional Government, are made up of two separate forces controlled by the rival parties that dominate different parts of Iraqi Kurdistan.

Back in Libya, there is not one but two rival governments: one in the capital, Tripoli, and the other in the eastern city of Tobruk. Each claims electoral legitimacy, and each is backed by a quarrelling coalition of militias. In Derna very few of the 80,000 residents felt much joy at learning they were now part of the Shura Council’s “emirate”. Another powerful militia in the town, the Abu Salim Martyr’s Brigade, a local affiliate of al-Qaeda, angrily rejects the notion of seceding from Libya. Rivalry between the jihadist gangs has already led to tit-for-tat murders. The fear is that it may now escalate into open warfare.

Meanwhile, in an apparent effort to assert state control, warplanes have bombed Shura Council bases on the outskirts of the town. They are assumed to be loyal to the Tobruk “government”, but no one is quite sure who ordered the raids or where they were launched from. “Ending this conflict is difficult,” admits Bernardino Leon, the weary UN official tasked with nursing Libya, “because the protagonists are hundreds of militias without a hierarchical relationship between them.”

In explaining the sudden rise of non-state forces in the region, many have faulted the supposed artificiality of Arab states, whose borders were in many cases defined by European colonial administrators. IS boasts of effacing the so-called Sykes-Picot accord between Britain and France that created much of the modern Middle East.

Yet the disintegration has not been limited to peripheral areas: it is the internal form of states, rather than the external shape of their territories, that has provoked a backlash. All too often the region’s insecure, control-obsessed governments—sometimes dominated by minorities—have failed to integrate citizens within an inclusive sense of nationhood. The major political ideologies—Arab nationalism, political Islam and now perhaps violent jihadism—transcend national borders.

Instead Arab rulers have wielded the apparatus of state power to obstruct any potential challenge, centralising all decisions and fomenting and exploiting divisions wherever possible. Syria, for instance, denied formal citizenship to tens of thousands of its Kurds for decades, and, like Iraq under Saddam Hussein, attempted forcibly to Arabise Kurdish regions.

Arab governments also often failed to provide public services or institutions such as decent courts, schools or hospitals, prompting citizens to take matters into their own hands. Especially among the poor and disenfranchised, it was religious groups and charities, many of them financed by conservative Gulf countries, that picked up the slack. National curriculums emphasised historical grievances and inculcated obedience to the state.

Where such hyper-centralised but ineffective one-party (or one-family) states have collapsed, there have been few structures to rebuild social cohesion. What had been small fractures between sects or tribes or ethnicities grew rapidly into wider cracks that are often exploited by external actors eager to exercise influence. Even seemingly benign interventions have made divisions worse: in Syria, competition for aid funding made rivals out of groups ostensibly devoted to the same goal of overthrowing President Hafez Assad.

Depressingly, those Arab states that have weathered the Arab Spring seem to have drawn the wrong lessons. Instead of promoting political reform, many have instead opted to harden the organs of repression. “The police state is back in full force,” says an Egyptian activist. “They are patching every crack in their wall of fear.”