Loneliness and social isolation are as much of a threat to longevity as obesity, according to a recent study.

"The effect of this is comparable to obesity, something that public health takes very seriously," Julianne Holt-Lunstad, lead author of the study, said in a statement

Researchers at Brigham Young University found that the association between loneliness and risk for mortality among young populations is actually greater than among older populations. Although older people are more likely to be lonely and face a higher mortality risk, loneliness and social isolation better predict premature death among populations younger than 65 years.

For the study, researchers analyzed data from a variety of health studies. Altogether, the sample included more than 3 million participants from studies that included data for loneliness, social isolation, and living alone.

"Not only are we at the highest recorded rate of living alone across the entire century, but we're at the highest recorded rates ever on the planet," said Tim Smith, co-author of the study. "With loneliness on the rise, we are predicting a possible loneliness epidemic in the future."

Previous research from Holt-Lunstad and Smith puts the heightened risk of mortality from loneliness in the same category as smoking 15 cigarettes a day and being an alcoholic. This current study suggests that not only is the risk for mortality in the same category as these well-known risk factors, it also surpasses health risks associated with obesity.

"In essence, the study is saying the more positive psychology we have in our world, the better we're able to function not just emotionally but physically," Smith said.

The findings are detailed in the journal Perspectives on Psychological Science.