Loneliness may be a health risk and can even increase a person's risk of premature death, studies have shown, but the reason for the link hasn't been clear. Now, researchers have found one way that loneliness may affect a person's health: It may trigger cellular changes that might lower a person's ability to fight viral infections.

In a study of 141 older adults, researchers looked at the relationship between loneliness and patterns of gene expression in white blood cells, which are involved in protecting the body against viruses and bacteria. Among the people in the study, 36 were classified as chronically lonely.

The researchers found that, in the chronically lonely people, the cells showed signs of an increased expression of the genes involved in inflammation and fighting potential bacterial infections, compared with the cells of people who were not chronically lonely. But the cells also had a lower level of expression of the genes involved in fighting viral infections.

This pattern of gene expression "is changing the body to be more likely to show an inflammatory response," said study author John Cacioppo, a psychologist at the University of Chicago. Although this response "puts the organism in a state of preparation for bacterial infection," he said. This, however, appears to occur at the cost of the ability to fight potential viral infections.

In other words, in lonely people, there is a shift "away from protecting against viruses, and more towards protection against bacteria," Cacioppo told Live Science.[9 DIY Ways to Improve Your Mental Health]

Moreover, the findings suggested that loneliness and the pro-inflammatory pattern of gene expression go hand in hand, and can propagate each other over time: The people who were chronically lonely at the beginning of the study were likely to still have this pro-inflammatory pattern of gene expression a year later, and those with this pattern of gene expression at the beginning of the study were also still lonely a year later, the researchers found.

These results could not be explained by other factors such as depression, stress level or degree of social support, they said.

In another experiment in the study, the researchers found the same pro-inflammatory shift in the pattern of genetic expression among lonely macaque monkeys. They also found that the shift seemed to be related to an increased output of immature cells called monocytes from the immune system. These cells have high levels of expression of inflammatory proteins, and low levels of gene expression of antiviral proteins.

In the monkeys, the scientists found that these pro-inflammatory changes in gene expression had real consequences for the monkeys' health. When they infected the monkeys with simian immunodeficiency virus, the monkey version of HIV, the virus grew faster in the blood and brains of the monkeys that were lonely than in the monkeys that were not lonely, the researchers found.

Lonely monkeys "showed a more advanced disease than the nonlonely [monkeys]," Cacioppo said.

The researchers said they are planning to continue studying how loneliness may lead to poor health outcomes and how these effects could be prevented in older people.

The new study was published Monday in the journal PNAS.

Copyright 2015 LiveScience, a Purch company. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.