As in many cities, gangs in Medellín provide order and collect “taxes.” Why do gangs govern civilians? Some argue that criminal and state rule are substitutes. Hence, increasing state presence should crowd out gangs. But they could also be complements. States produce growth and general demand for governance. Also, gangs can deter state entry by keeping neighborhoods orderly. We exploit border discontinuities to show that increases in state presence raised gang rule. The data suggest that gangs reacted strategically, preserving order to keep the state out. Criminal groups govern millions, and our results help explain these patterns emerge and persist.