We estimate the technical efficiency of Mexican states using stochastic production frontier models. In particular, we study the effect of crime on efficiency. The empirical section uses panel data over the period 1988-2008. A distinctive feature of the paper is the use of socioeconomic and location data in order to control for the heterogeneity of the states. The main contribution of this paper is to test for the existence of a threshold effect of crime. We find that crime rate negatively affects the efficiency of the states and that its effect is only significant after a certain level.