One reason for that might be the role of friendship within marriage. Those who consider their spouse or partner to be their best friend get about twice as much life satisfaction from marriage as others, the study found.

The effect of friendship seems to be the result of living with a romantic partner, rather than the legal status of being married, because it was as strong for people who lived together but weren’t married. Women benefit more from being married to their best friend than men do, though women are less likely to regard their spouse as their best friend.

“What immediately intrigued me about the results was to rethink marriage as a whole,” Mr. Helliwell said. “Maybe what is really important is friendship, and to never forget that in the push and pull of daily life.”

Marriage has undergone a drastic shift in the last half century. In the past, as the Nobel-winning economist Gary Becker described, marriage was utilitarian: Women looked for a husband to make money and men looked for a woman to manage the household.

But in recent decades, the roles of men and women have become more similar. As a result, spouses have taken on roles as companions and confidants, particularly those who are financially stable, as the economists Betsey Stevenson and Justin Wolfers have discussed.

The benefits of marital friendship are most vivid during middle age, when people tend to experience a dip in life satisfaction, largely because career and family demands apply the most stress then. Those who are married, the new paper found, have much shallower dips – even in regions where marriage does not have an overall positive effect.

“The biggest benefits come in high-stress environments, and people who are married can handle midlife stress better than those who aren’t because they have a shared load and shared friendship,” Mr. Helliwell said.

Overall, the research comes to a largely optimistic conclusion. People have the capacity to increase their happiness levels and avoid falling deep into midlife crisis by finding support in long-term relationships. Yet those relationships seem to be less achievable for the least advantaged members of society.