This study investigates the effect of violent crime on school district-level achievement in English Language Arts (ELA) and Mathematics. The research design exploits geographic variation in achievement and crime across 337 school districts and temporal variation across seven birth cohorts of children born between 1996 and 2002. To generate causal estimates of the effect of crime on achievement, the identification strategy leverages exogenous shocks to crime rates arising from the availability of federal funds to hire police officers in the local police departments where the school districts operate. Results show that birth cohorts who entered the school system when violent crime was lower score higher in ELA by the end of eighth grade, relative to birth cohorts attending schools in the same district but who entered the school system when crime rates were substantially higher. A 10 percent decline in violent crime raises eighth-grade ELA achievement in the district by .04 standard deviations. Analyses by race/ethnicity and gender indicate that black children, Hispanic children, and boys experienced the largest gains in ELA achievement as violent crime dropped. The effects on Mathematics achievement are smaller and imprecisely estimated. These findings extend our understanding of the geography of educational opportunity in the United States and reinforce the idea that understanding inequalities in academic achievement requires evidence on what happens inside schools as well as what happens outside of schools.