This paper evaluates the impact of quality of education on violence and crime using student performances on a mandatory examination as the measure of quality. The paper exploits transfers of funds from central government to municipalities for investments in education as a source of exogenous variation and finds that better education quality has a negative impact on economic crimes such as kidnapping rates, rate of theft on persons and presence of illegal armed groups. The findings are consistent with an opportunity cost effect of education, that is, high quality education increases expectations of being absorbed by the labor market and discourages engaging in criminal activities. Results also point to perhaps a pacifying effect of education such that improvement of education quality generates less violent environments, promotes social and political stability. The results are found to be robust to a number of econometric concerns and different measures of quality of education.