From a long and horrifying New York Times article about how the Islamic State treated the captured American journalists it later beheaded:
The jihadists had gone from obscurity to running what they called a state.
In areas under their control, they established an intricate bureaucracy, including a tribunal, a police force and even a consumer protection office, which forced kebab stands to close for selling low-quality products.