It’s supposed to last through sickness and in health, but it turns out that it’s a better idea to get married because you love someone, not because you think it’s going to keep you healthy for the long haul.

That’s the message from a study published this month in the Journal of Health and Social Behavior, which contradicts previous research that extolled the health benefits of partnership. It turns out that marriage is all well and good — until a person’s health starts declining.

While studies of married and single people show that healthy unmarried people are far likelier to die than healthy married people during the 20-year research period, the numbers equal out when both married and unmarried people report poor health. “Marriage is more protective for healthy people,” says lead author Hui Zheng, an assistant professor of sociology at Ohio State University.

In the study, researchers tracked 789,000 people who participated in the National Health Interview Survey from 1986 to 2004. Participants were asked to rate their health from excellent to poor. Follow-up data allowed Zheng and Patricia Thomas, a postdoctoral fellow at the University of Texas at Austin, to determine that 24,100 participants died between 1986 and 2006.

When they reported excellent health, unmarried people in the study were on average 75% more likely to have died than married people. More specifically, separated folks were 58% more likely to die during these studies, divorced people were 62% more likely and widowed people were 93% more likely to kick the bucket compared with married people.

Marriage, then, can be a boon for a health. “It encourages people to maintain good health behaviors and have good social support and a sense of purpose in life,” says Zheng.

But while “marriage is good for health … its protective effect declines as people’s health declines,” says Zheng. Unmarried people who reported fair (as opposed to excellent, very good, good or poor) health were 40% more likely to die than similar married people in the study. That breaks down to a 39% greater risk of dying for those who were separated, a 31% higher risk for divorced people and 20% higher risk of dying for widowed people compared with those who were married.

What’s going on? Does love fade as health fades? That’s hard to document from the studies analyzed, but part of the explanation may be more prosaic. Married people are not as quick to report declining health as unmarried people are. So by the time a married person cops to having failing health, that person may already be in dire straits.

Meanwhile, a separate Danish study published this week in the International Journal of Epidemiology has found that gay men are doing pretty well with longevity: their mortality rate has dropped below that of unmarried or divorced men. Denmark boasted the world’s first legislation in 1989 recognizing same-sex partnerships.

The good news doesn’t extend to married lesbians, however; their mortality rates rose, primarily because of suicide and cancer, according to the same research. Researchers aren’t sure why marriage didn’t have the same beneficial effects on lesbians’ health as it had on men’s health.

The complicated results confirm one thing that’s clear about marriage — it is indeed complicated, especially when it comes to the ways that these perfect unions can impact health and longevity.