A framework is developed in which the formation of gangs-the criminal market structure-is endogenous. As in standard models of crime, under a given gang structure, an increase in deterrence reduces criminal output. However, under identifiable circumstances, an increase in deterrence can lead to...