IRBIL (Iraq) - In northern Syria, the militants of the Islamic State in Iraq and Syria (ISIS) have fixed power lines, dug sewage systems and painted sidewalks. In Raqqa, they search markets and slaughterhouses for expired food and sick animals.
Farther south, in Deir al-Zour, they have imposed taxes on farmers and shopkeepers and fined men for wearing short beards.
The group runs regular buses across the border with Iraq to Mosul, where it publicly kills captives and trains children for guerrilla war. Last month, it re-opened a luxury hotel in the city and offered three free nights to newlyweds, meals included.
A year after ISIS seized Mosul, and 10 months after the United States and its allies launched a campaign of air strikes against it, the terrorist group continues to dig in, stitching itself deeper into the fabric of the communities it controls.
In vast swathes of Syria and Iraq with shattered ties to national governments, the hardliners have worked to fill the void, according to interviews with residents from areas in Syria and Iraq ruled by ISIS.
The group is offering reliable, if harsh, security; providing jobs in decimated economies; and projecting a rare sense of order in a region overwhelmed by conflict.
With no political solutions in sight for the wars that have allowed the group to thrive, little has prevented the Islamists from deepening their roots in ways that will make them even harder to dislodge.
"As a way of life, people got used to it," said a labourer from Raqqa who had earned good money painting the group's new offices in the city.
If you followed the rules, the fighters left you alone, he said, although he wished life were more peaceful.
"It is not our life, all the violence and fighting and death," he said, speaking on the condition of anonymity, like others from areas run by ISIS, so as not to anger the militants.
"But they got rid of the tyranny of the Arab rulers."
In the process, the ISIS administration has ballooned. The group has issued declarations banning dynamite fishing and Apple products, pressuring teachers to work in its schools, offering rewards for the killing of Jordanian fighter pilots and advising wounded residents not to travel to Turkey for prosthetic limbs because ISIS now makes them at home, according to documents compiled by a fellow at the Middle East Forum Aymenn Jawad Al-Tamimi.
ISIS's territory now stretches across hundreds of kilometres, from the outskirts of Aleppo in Syria into central Iraq, where it shares a volatile border with the Kurds in the north and approaches Baghdad in the south.
Much of that area is sparsely populated desert, but the group has millions of people under its charge, as well as archaeological sites, a hydroelectric dam and oil fields that help finance its operations.
ISIS differs from Islamic radical groups like Al-Qaeda in its drive to establish a Sunni Muslim state governed by an extreme version of Islam.
Its method of seizing territory seeks to lay the groundwork for this by prompting a "geographic cleansing", according to a Jordanian expert on Islamist groups Hassan Abu Hanieh.
Enemies, like government soldiers, the police and those who do not fit in, such as minorities or elites, flee or are killed. What remains are mostly Sunni Arabs who try to continue their lives with little disruption.
The dynamics of ISIS rule differ from place to place.
In Mosul, food is plentiful but the militants restrict people who try to leave the city, making relatives vouch for them and arresting the family members if the travellers do not return.
Life is easier in Raqqa, where residents regularly cross the Turkish border, returning with goods and cash earned outside.
Locals suffer more around Deir al-Zour, where ISIS fought for nearly a year to subdue local tribes and rebel groups in battles that killed more than 1,000 people.
Residents of ISIS areas do not describe easy lives, but some want the hardliners to stay, reflecting the deep political failures in their countries.
Many Sunnis in Iraq trust ISIS more than the Shiite-led government in Baghdad and the militias it has used to fight the militants.
"Now there is more security and freedom, no arrests, no harassment, no concrete barriers and no checkpoints where we used to spend hours to get into the city," said Mr Mohamed Al-Dulaimi of Fallujah, an Iraqi city controlled by ISIS.
"What will happen if the militias enter Fallujah?" he said.
"We will take our guns and fight them, not because we are ISIS, but because the militias will kill us all."
NEW YORK TIMES