A new study concludes economic downturns lead to an increase in substance use disorders involving prescription pain relievers and hallucinogens. The connection is strongest among middle-aged white males with low levels of education.

The researchers studied the Great Recession of 2007-2009 and its potential impact on substance use, The Wall Street Journal reports. They find “clear evidence that substance-use disorders involving analgesics and hallucinogens are both strongly countercyclical,” meaning that such drug use increases when the economy falters.

The relationship between unemployment and painkiller abuse is especially strong among people who work in sales and service occupations, the researchers wrote in a National Bureau of Economic Research working paper. They found in fields such as construction, maintenance, machine operators, transportation workers and the armed forces, heroin use was strongly countercyclical.

“As state budgets contract during economic downturns, drug-treatment funding is particularly vulnerable,” the researchers wrote. “Our findings suggest that such funding cuts, if untargeted, could lead to significant adverse effects on individuals with substance-use disorders.”

A study published last year found the death rate of white middle-aged Americans is on the rise, driven in large part because of drug and alcohol overdoses, suicide, chronic liver disease and cirrhosis of the liver. The Princeton University researchers said no other industrialized country has seen a similar deterioration in health during the 15 years studied, from 1999 to 2013.

The researchers connected rising death rates in middle-aged whites to factors including increasing reports of pain, growing psychological distress, more alcohol poisonings and greater availability of prescription painkillers such as OxyContin and Vicodin.

Another recent study suggested that economic downturns can lead to greater rates of drinking even among people who hold onto their jobs. Previous research has shown people who lose their jobs during a recession are more likely to drink.