The Islamic State of Iraq and Syria, or ISIS, smashed its way into the world’s consciousness earlier this month when it seized Mosul and the Beiji oil refinery in Iraq. Starting last fall, ISIS began imposing its theocratic rule over a wide swath of Syria, then quickly wrested control of the emblematic Iraqi cities of Fallujah and Ramadi. With the more recent attacks, it menaced the government in Baghdad; it also forced President Obama to reengage with a war from which he thought he had extricated the United States.

In trying to explain ISIS’s rapid success, alarmed observers have pointed to the extreme tactics that drew condemnation even from Al Qaeda: mass executions, beheadings, and crucifixions. Some see local conspiracies, believing Arab governments allowed the group to grow in order to justify their own heavy-handed crackdowns. Others suggest that Shi’ite Iran indirectly funded the movement as part of its own strategy to divide the Sunnis from within.

Most analysts predict that ISIS’s conduct will ultimately limit its future: They say it has no meaningful political program or ability to form a state, and its extremist views will alienate the people who live under its rule.

But that view of ISIS’s success and prospects overlooks one key element. A look at both ISIS’s written edicts and its tactics suggest that the group has gotten one important thing right: It has created a clear—and to some, compelling—idea of citizenship and state-building in a region almost completely bereft of either.

ISIS’s support comes from a direct appeal to Sunni Muslims as a religious and political constituency. It has made clear that it expects people under its power to take an active role in establishing a new Islamic state. And it has enlisted them in a project to assert the power of their religious community over the Shia, who currently dominate the territory from Iran to Lebanon.

Its idea of statehood is far from the modern Western one, to say nothing of its idea of citizenship; anyone not considered part of ISIS’s goals is subject to death, the more grisly and public the better. But the brutality of ISIS can distract from the way it has offered its constituents something they’ve been denied by the despotic regimes of the region.

During decades of independence, post-colonial Middle Eastern governments have failed to establish national identities strong enough to counter the attraction of violent, intolerant groups that promise members a genuine stake in their own futures. Whether in fractured states like Lebanon, Iraq, and Libya, or strong centralized dictatorships like Egypt and, before its civil war, Syria, Middle Eastern governments have ruled more by force than persuasion, eliciting only shallow loyalty from their people. As repugnant as its tactics are, ISIS offers Sunnis a rare opportunity: a chance, in effect, to be a citizen. Irreconcilable fanatics might form the group’s core membership, but it has attracted broader support in the Sunni community. Understanding that appeal is the key to countering it.

The rebellions that have ripped apart Iraq since 2003 and Syria since 2011 are complex, pitting a confusing patchwork of militias against the regimes in Baghdad and Damascus, and often against one another. Even in that tortured context, ISIS stands out for its brutality, its uncompromising theology, and the rapidity of its success.

Originally established in 2004 as Al Qaeda in Iraq, the group changed its name after its founder Abu Musab al-Zarqawi was killed by the US military in 2006. Its current leader, Abu Bakr al-Baghdadi, took over in 2010, and has steadily expanded the group’s power and reach. (Al Qaeda formally disavowed ISIS at the beginning of this year.)

Olivier Roy, a French political scientist and author of several definitive books on political Islam, reflected the consensus on ISIS when he dismissed it as a classic jihadi group. “ISIS is an army of militants, not a political party, nor a social movement,” Roy told The New Republic. “It succeeds because the others failed; and as everywhere it will confront a backlash of the civil society.”

The extensive paper trail that ISIS leaves wherever it goes, however, suggests a more complex and deliberate strategy, combining a typical religious-splinter-group playbook with a genuine interest in building a state and a citizenry.

When ISIS stormed into Mosul in June and sent the Iraqi Army running, it did not begin governing by whim. Rather, it published rules. In a 16-point communiqué signed by the secretive al-Baghdadi, ISIS stated expectations for the local population that were clear, direct, and to the point. Women had to “dress decently” and only go outside “if needed.” Muslims must go to prayers on time, and thieves would have their hands cut off.

These requirements were placed in a larger ideological context. “People tried secular forms of government: republic, Baathist, Safavids,” ISIS declared. “It pained you. Now is time for an Islamic state.”

‘’

The decree announced that all Iraqi government property was confiscated and could only be distributed by ISIS leaders. Tribal leaders were warned not to cooperate with the government. Guns and flags were banned. Police and soldiers were instructed to register at special “repentance centers.”

AFP PHOTO/HO/ALBARAKA NEWS

ISIS militants breach the Syrian-Iraqi border, aiming to carve an extremist state out of Sunni-dominated swaths of the two countries.

In territory under its control, ISIS has followed a methodical script. Once it has established military dominance, it takes over power plants, factories, bakeries, and food supplies. Its lawyers draft modern contracts that spell out the Islamic responsibilities of local organizations that want to work with the displaced. Even its name is telling. Critics address it derisively by its acronym, but ISIS members call it “al-Dawla,” or “the state.”

Like all the movements that have built influence in the region, ISIS asks its constituents to take active responsibility—enforcing moral codes, reporting crime and corruption, spreading the call to God.

“It’s not the old model where the citizen is passive and plays no role,” said Brookings Institution scholar Shadi Hamid, author of the book “Temptations of Power: Islamists and Illiberal Democracy in a New Middle East.” “Within certain limits, if you agree to abide by these strict rules, there is an active role for citizens under ISIS.”

In countries where citizens have well-established political rights, this level of participation might seem inconsequential. But in modern Middle Eastern states—where regimes rule through benign neglect or, worse, by deliberately seeking to keep their populations passive and disengaged—even the smallest call to action can feel appealing.

Hamas in Palestine, Hezbollah in Lebanon, and the Muslim Brotherhood in Egypt have all thrived by mobilizing members around a project and a shared identity. So have smaller groups led by clerics or militants in Bahrain, Iraq, Syria, and elsewhere. Much of the early enthusiasm behind the Egyptian uprising of Jan. 25, 2011, arose from the promise that after decades of effective military dictatorship, Egyptians could finally live as citizens, with both rights and responsibilities.

To Westerners, ISIS’s combination of participatory, grass-roots governance with total rejection of pluralism and democracy can be puzzling. But like the Islamic Jihad and Al Qaeda, ISIS draws from the Sunni jihadi tradition, which has always demanded huge commitment and involvement from its followers while excluding everyone else. ISIS takes these concepts to their limits; in its view of sharia, or Islamic law, “heretical” sects like Shia Islam should be eliminated. Christians and Jews would theoretically be allowed to live under ISIS protection as heavily taxed second-class citizens.

That may strike observers as extremism, but in fact, sectarian governance is already the de facto rule in much of the Middle East. To supporters and fellow travelers, the ideology of groups like ISIS can seem like a rare acknowledgment of reality: Ruling parties only pretend to believe in a national identity while actually just enforcing the power of one sect or clique. Iran holds elections, but only to calibrate the balance of power within one faction of the Shia clerical establishment. Iraq is a multi-ethnic democracy that is in practice run by a Shia warlord. Saudi Arabia, the richest and possibly most influential state in the region, is run as a feudal monarchy by a single family that enforces many of the same intolerant religious rules as ISIS.

As a result, ISIS has won support, or at least acceptance, from people who would never identify as extremists. “They’re in control, and they’re no worse than the regime,” said one engineer named Abdullah. He was speaking at the bus station in Kilis, Turkey, where he had brought his family to escape regime bombing in Aleppo. Some of his relatives lived in ISIS-controlled areas, others under the Assad regime, and some, like Abdullah himself, under the less virulently Islamist Free Syrian Army. Abdullah said he didn’t share the views of ISIS but didn’t mind them either. “Their rules are clear. If they leave people alone, it’s not so bad.”

***

Nihilist extremists have managed to attract armed followers in corners of the United States, Europe, India, and elsewhere, but they remain nothing more than a violent nuisance when countered by an effective state that commands the loyalty of its citizens. Not so in the Arab world. So far ISIS has bested the armies of Syria and Iraq, which appeared unwilling to fight, and small Syrian militias that have gone head to head with ISIS but are at a colossal disadvantage in funds and firepower.

ISIS hasn’t yet clashed directly with the Shia sectarian militias, like Hezbollah and like the reconstituted Mahdi Army, Badr Brigades, and others in Iraq, which display a similar fanatical sectarian zeal and lack of restraint. It already has some advantages over some of these organizations, however. Unlike Al Qaeda’s vague vision of a borderless world run by extremist jihadis, ISIS has a plan to build a viable state right now. In less than a year it has secured a de facto country, and acquired an arsenal of American weapons as war booty. It has formed alliances with non-jihadi Sunni leaders, including Baathist allies of deposed Iraqi dictator Saddam Hussein. And crucially, it has laid out a blueprint for a viable self-funding Islamic state, drawing a steady income instead from a commercial tax base and the crucial energy industry it has captured.

Until the Arab states come up with a counter-appeal, groups like ISIS will continue to rise and peel away the loyalty of their citizens. The obvious solution is a system of Middle Eastern government that grants genuine representation and a national identity to people regardless of sect or ethnicity. Two hundred years ago, the Ottoman Empire provided a template that allowed its subjects to live locally within their own religious and ethnic communities while leaving matters of law and commerce to a transnational authority. Fifty years ago, governments flirted with Baathism and Arab Nationalism, both ultimately failed experiments to create a transcendent and unifying ideological identity.

As the region has grown more diverse and its population more educated, its governments have moved in the opposite direction, acting more repressive, intolerant, religious, and antipluralistic. Today, there is not a single alternative vision of citizenship being offered in the region, not even a bad one. Groups like ISIS, or for that matter Hezbollah—which in all other matters is its polar opposite—thrive because they have an idea of what a citizen should do and be.

Today fragmentation and sectarianism seem to have the upper hand, but the regional uprisings that began in 2010 bespoke a widely shared desire to break free of the old categories of identity and the old relationship of omnipotent rulers and passive subjects. Unless those revolutions bear fruit, the people who rose up will face waves and counterwaves of domination from two difficult kinds of masters: tyrants who offer no shot at citizenship, or extremists who offer it to a select religious group on their own violent terms.

Thanassis Cambanis, a fellow at The Century Foundation, is the author of “A Privilege to Die: Inside Hezbollah’s Legions and Their Endless War Against Israel.” He is an Ideas columnist and blogs at thanassiscambanis.com.