Abstract: Is the opioid epidemic attributable to prescription painkillers being more accessible or to opioid substitutes being less accessible ? I find that the state-level decision to increase access to prescription painkillers by expanding Medicaid under the Affordable Care Act increased both opioid prescriptions and in opioid-related deaths. These results vary strongly by demography, being driven largely by deaths of white men without college degrees. A back of the envelope calculation suggests that, for an average county, Medicaid expansion caused approximately 2,800 more people to be insured per year, 175,000 more opioid units to be prescribed per year, and 4 additional opioid-related deaths per year. Overall, opioid accessibility shocks explain about 12,000 opioid deaths per year, or nearly a third of the overall death toll. I also find that the state-level decision to legalize recreational Marijuana (a substitute painkiller) reduced opioid related deaths. Overall, these opioid-substitute accessibility shocks account for a reduction of about 12,000 opioid deaths per year. I conclude that policy-makers can achieve reductions in opioid mortality without restricting access to opioids.