The number of major Drug Trafficking Organizations (known as cartels) in Mexico increased from four to nine over the last two decades. An increase in drug trade-related violence accompanied this. This paper examines the relationship between violence and competition for market share among cartels. To measure cartel presence, a difficult-to-measure phenomenon, I construct a novel data set of cartel presence across Mexican municipalities by scraping Google News and using natural language processing. To study how market size and structure interact with violence, I exploit two empirical strategies within municipality variation. First, I interact heroin prices with agro-climatic conditions to grow opium poppy, using exogenous variation in demand for heroin from the 2010 OxyContin reformulation. This reformulation made OxyContin harder to abuse and led some opioid abusers to switch to heroin. Second, I exploit variation in the timing of cartel entry in a municipality. Cartel presence increases substantially after 2010 in municipalities well-suited to grow opium poppy. As more cartels enter a market, homicide rates increase. These results suggest that a substantial part of the increase in violence that Mexico experienced in the last fifteen years is due to criminal groups fighting for market share of heroin, not only due to changes in government enforcement.