Violence has increased all around Mexico in the last years, reflecting an uprise in the rate of homicides, and especially after some federal intervention took place to fight the drug cartels in some states. In this paper we use data at the municipal level to link social and institutional factors with the rates of homicides. We exploit the entrance for federal army interventions in 2007 and 2008 in some states to fight drug cartels. Using different estimation methods, we find that inequality, access to social security and income, as well as local provision of security and law are relevant in explaining homicides. We also find that the army interventions have increased not only drug related homicides, but also general homicides in municipalities under intervention compared with those with no intervention.