The secret to living a longer life might be something a tad ironic or counterintuitive: worrying all the time.

Neurotic people are less likely to die, including from cancer and cardiovascular and respiratory diseases, according to research published in the journal Psychological Science. Scientists used data of self-reported health from more than 300,000 people in the U.K. to come to the conclusion that being neurotic is “associated with lower mortality,” especially when the person has feelings of worry and vulnerability. That pattern remained even after the researchers took into account that neurotic people are more likely to report being in poor health, regardless of their actual condition, and adjusted the results.

Read: Having ADHD Might Make You Better at Business

The study says the relationship might reveal something about how being a worrywart can be a positive trait: “Research into associations between personality facets and mortality may elucidate mechanisms underlying neuroticism’s covert protection against death.”

People whose data were included in the study had rated their own health as well as listed details like their blood pressure and pre-existing medical conditions. They also described health-related behaviors like smoking and exercise. Following up with the group several years later, scientists found that nearly 4,500 participants had died.

But the neurotic ones were more likely to live — and that was regardless of behavior.

“Health behaviors such as smoking, exercise, diet and alcohol consumption did not explain any part of the link between high scores on the worry/vulnerability facet and mortality risk,” lead researcher Catharine R. Gale said in a statement from the Association for Psychological Science. “We had thought that greater worry or vulnerability might lead people to behave in a healthier way and hence lower their risk of death, but that was not the case.”

Previous studies into the link between neuroticism and physical health have had mixed results, but it might be surprising that worry could have a positive effect on health given the established link between anxiety disorders and physical health conditions — the chronic worry and other negative feelings neurotic people experience are similar to some symptoms of an anxiety disorder. Harvard Medical School explains, for example, that in addition to short-term symptoms like dizziness, nausea and pain, it has been suggested that the mental illness is associated with gastrointestinal disorders like irritable bowel syndrome, heart disease and heart attacks, among others.

“Given the evidence indicating that people with higher levels of psychological distress are more likely to die sooner than people with lower levels, one might expect that higher neuroticism would be associated with increased mortality,” the study says.

But it’s possible that people who are neurotic are more likely to pay attention to their health and report a problem to the doctor. If that translates to the doctor detecting cancer earlier, that increases a person’s chances of survival from the disease. It’s also possible that people who are neurotic are more likely to change their behaviors to improve their health and stick to their new routine.

“Our findings are important because they suggest that being high in neuroticism may sometimes have a protective effect, perhaps by making people more vigilant about their health,” Gale said.

Read: What Are the Best Countries for Health Care?

That idea is not particularly new. Previous studies have shown a connection between what goes on in people’s heads and their physical health. For example, a study earlier this year found that people who were more skilled with numbers were more likely to survive a heart attack, because these nerds tended to get help for their symptoms earlier during a cardiac event, improving their chances of making it through. Math skill could be a deciding factor because being better with numbers helps a person weigh risk.

When it comes to a possible link between chronic worry and mortality rates, the researchers on this study say their next step is to dive deeper into neuroticism and its different forms to figure out why specifically feelings of worry and vulnerability could offer more protection than other neurotic feelings.