In this paper published by the International Journal of Educational Development, we investigate the impact of drug-related violence in Mexico on academic achievement. We use panel of elementary and lower secondary schools and locality-level firearm homicides from 2006 to 2011. We rely on school fixed-effects models to estimate the impact on math test scores of turf war exposure and turf war persistence (e.g. months of exposure) during the academic year. According to the results, both exposure and persistence of criminal violence reduces math test scores. The analysis of heterogeneous effects shows that schools located in poor urban settings experience the largest negative effects. Further, we find stronger negative effects of drug-related violence exposure in lower secondary schools with street gang presence nearby. Finally, we further examine potential mechanisms driving the effects of criminal violence on test scores. Our findings indicate that turf war exposure and persistence are associated with a loss of instructional time due to higher teacher absenteeism and turnover, as well as student absenteeism, tardiness, and propensity to leave school days early.