Workers who do the the roughest jobs are no strangers to risk: Slipping off a scaffold, or getting bludgeoned by a collapsing crane are everyday worries. But they may not know that the deadliest occupational hazard could come in their doctor’s office—with a prescription that will one day become their death warrant.

A groundbreaking study in Massachusetts links dangerous workplaces to another crisis: The construction industry and related fields have a higher rate of opioid deaths than other industries. On the surface, the link between workplace injuries and opioid deaths seems obvious in only one aspect—they both disproportionately affect the working poor. The puzzle for policy-makers is the cause-and-effect relationship between tough jobs and drug dependency. Worker advocates say that at the intersection between work and health, two crises often mix fatally in the lives of struggling workers.

Administered through the Massachusetts Department of Public Health, the study traces the overlap between job quality and opioid-related death risk, and shows workers in construction and extraction jobs had “six times the average [opioid-related death] rate for all Massachusetts workers,” or about 150 deaths per 100,000 workers, compared to the average of 25. Of an estimated 5,580 opioid deaths in Massachusetts from 2011 to 2015, about 1,155 were in construction. Other high-risk, high-overdose job sectors include farming, fishing, and forestry work, with five times above-average fatality rates.

Further parsing the demographic profile of opioid deaths shows how gender, labor segregation, and job quality are interconnected factors that drive the drug crisis. For women, the top overdose-related jobs were in health-care support and food service—also sectors known for low pay, high stress, and erratic work schedules.

Not surprisingly, the highest death rates were among those earning the least (under $30,000 annually), and with poor access to health care. Workers without paid sick leave and lacking job security (as measured by workers’ general worries about losing employment) were also more vulnerable to overdose death. These circumstances “increase the need to work while in pain and…increase reliance on pain medication.” Job instability is also a common feature of on-call or contract-based jobs—all prevalent in construction, restaurant and hospitality, and frontline health-care jobs. Meanwhile, public-health advocates criticize the state Workers Compensation system, which is supposed to cover workplace-related injuries, as insufficient and inaccessible for many workers.

Though opioid misuse and overdose are generally not seen as “work-related injuries,” the research draws a through-line from tough jobs to overdose, which parallels “common use of prescribed opioids for management of acute and chronic pain following work-related injury.” Construction workers are especially at risk: one occupational-health study found that roughly three in four reported muskoskeletal pain in the past three months, and 40 percent reported at least one injury in the past month. According to an analysis by the advocacy group Massachusetts Coalition for Occupational Safety and Health (MassCOSH): “workers are unable to take time off to heal and work though their pain, exacerbating their injuries and increasing their medication intake, leading to addiction.” The bottom line: A job that leaves you hurt all the time leads to a constant need for medication, which can in turn grow into a dangerous habit that could end in a lethal dose.

According to Jeff Newton of MassCOSH, in the dangerous workplaces that the group monitors, the downward spiral of opioids often starts with the banal aches and pains that come with a bad fall or pulled muscle: “We have many members who state how common it is to be given pills after an injury, then find themselves unable to stop due to stress, pain, and other issues.”

The rates of opioid-related death also differed depending on race: Among white workers (who generally have higher rates of fatal overdose), death rates were highest for jobs in maintenance, construction and natural resource extraction (such as logging). For workers of color, black and Latinx workers in service industries—such as low-wage retail and fast food—were more prone than their white counterparts to lethal overdose.

Though there is much that is not understood about the origins of opioid use and addiction, it’s clear that overprescription of opioids has been driving a drastic increase in excessive use in working-class communities, and it’s driving many into both poverty and full-blown street heroin addiction.

Yet for an epidemic that often festers in private, this study also points to a solution in the workplace: keeping workers safe, first and foremost, and if they do get hurt, ensuring “Access to care, support, and the means to take time off of work with pay.” Worker-safety advocates say that although treatment and rehabilitation are helpful, they are, by definition, reactive. From a more holistic health-and-safety standpoint, Newton explains, “we believe virtually all injuries on the job can be prevented. We think we should aim for the difficult yet worthy goal that would nip this problem at the bud.”

With all forms of work-related risk, prevention is always key—whether that means wearing a hard hat on a building site, or giving an injured worker more time off to heal instead of constantly popping pills to cope. And workplace organizing can give workers more control over their working conditions, including issues such as safety training, protective gear, and safe scheduling. Unionization provides a framework for holding bosses accountable when they fall short of regulations and contract-mandated protections.

Unfortunately, however, with federal labor regulators deeply under-resourced, workers are largely on their own in defending their health and safety at work. MassCOSH points out that Massachusetts has one official labor inspector for every 115,863 workplaces; the vast majority of workers will never work on a site that has been recently monitored for safety.

In the toughest industries, workers are guaranteed just one thing: Danger is always lurking around the corner. Though work is not the direct driver of the opioid epidemic, it is often where toxic lifestyles, economic struggles, and physical pain converge. And when the pain becomes unbearable, all that many can reach for is a pill. Whether trapped in a dead-end job or the grip of addiction, there’s nothing to catch them when they fall.