Any job is better than no job.

Or at least that’s the thinking when it comes to preserving physical and mental health after unemployment. Indeed, many studies have found that the long-term unemployed have at least twice the rate of depression and anxiety, as well as higher rates of heart attacks and strokes. One study on Pennsylvania men weathering the 1980s recession found that a year after they were laid off, the men’s risk of dying doubled. And as one review of the most recent recession put it, “nearly all individual-level studies indicated that job loss, financial strain, and housing issues were associated with declines in self-rated health during the Great Recession.”

“Employment is the essential element of social status,” said the public-health researcher M. Harvey Brenner in 2002, the year he authored a major study that showed that unemployment is associated with a greater risk of death. “When that is taken away, people become susceptible to depression, cardiovascular disease, AIDS, and many other illnesses that increase mortality.”

But a new study complicates the idea that literally any job is better than no job, at least when it comes to health outcomes. Instead, some jobs might only exacerbate chronic stress—and in the long run, disease.

For the study, recently published in the International Journal of Epidemiology, Tarani Chandola and Nan Zhang from the University of Manchester examined 1,116 people in the United Kingdom aged 35 to 75 who were unemployed in 2009, when the study began. They measured their indicators of chronic stress—as determined by metrics like allostatic load, “bad” cholesterol, and C-reactive protein levels—over the course of two years. (Allostatic load is a measure of wear and tear on the body’s endocrine and immune systems as a result of stress; C-reactive protein is made by the liver in response to inflammation.) If the subjects got jobs, the researchers gauged their level of “job quality,” as measured by how anxious their jobs made them, how satisfied they were with their jobs, how much autonomy and security they experienced, and how much they were paid.

Compared to those who remained unemployed, those who moved into poorer-quality jobs had higher markers of inflammation and a lower creatinine clearance rate, a measure of how well the kidneys are functioning. Those in better jobs, meanwhile, had less inflammation. Those in good health were more likely to get any kind of job in the first place, so the findings can’t be explained by the subjects’ health status at the outset.

Those who moved into good jobs also scored higher on mental health than those who remained unemployed, but those who moved into poor-quality jobs did not see improvements in mental health. In other words, the simple act of working, say, a minimum-wage job wasn’t enough to boost the participants’ mental health.

This study builds upon a recent meta-analysis, which found that though unemployment is still worse for health overall, job “insecurity” was also associated with physical symptoms.

This study might not be perfectly generalizable to the United States, since the United Kingdom’s more generous social-welfare system might have been protecting the unemployed workers from some of the causes of poor health, such as lacking enough food or a safe place to sleep. It’s possible that the unemployed workers would have been more stressed out if, for example, they also lacked a way to pay their medical bills, as they would have in many parts of the United States.

And it’s important to note that higher biomarkers of inflammation do not necessarily mean the employees in bad jobs were already feeling sick. The authors point out that biomarkers are the first step in a long path to disease. People usually don’t notice their levels of stress-related inflammation unless they start to experience clinical symptoms, such as high blood pressure or diabetes.

So it might very well be years before the effects of a toxic job start showing up in your annual physical. But like anything else that’s stressful and unrewarding, it may very well leave a biological mark.