Research is mounting that how you feel affects your heart—especially if you feel all alone. A new study published in the journal Heart found that lonely people had a much greater risk of heart attack and stroke than those who had strong social relationships.

Led by Nicole Valtorta, a research fellow at the University of York in the United Kingdom, a team dug through scientific literature on loneliness and analyzed 23 existing studies involving 181,000 healthy people. They found that loneliness, a negative feeling people get when they’re unhappy about their relationships, was linked to a 29% increased risk of coronary heart disease and a 32% greater risk of having a stroke. That makes loneliness as much of a risk factor for cardiovascular disease as anxiety and job strain.

Get our Health Newsletter. Sign up to receive the latest health and science news, plus answers to wellness questions and expert tips. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

It has such profound effects on the body through three different pathways, Valtorta says. Loneliness affects a person’s behavioral and lifestyle factors. “Isolated or lonely people would be more likely not to be physically active, to smoke, to not go see their doctor, to be less likely to eat well and to have higher rates of obesity,” she says. The second is biological, since loneliness can affect people’s immune systems and might make them less likely to deal with stress. The third is psychological; loneliness is linked to higher rates of anxiety and depression.

Valtorta is currently working on a study to help tease apart these different pathways in order to see how loneliness is causing the most harm. Thankfully, the opposite also appears to be true: that cultivating strong relationships leads to healthier hearts. Having friends, according to one study, protects the health about as much as exercising does.

Write to Mandy Oaklander at mandy.oaklander@time.com.