New research suggests that middle and high school friendships could predict physical health in adulthood, The Tribune reported.

Although teens are often warned to beware the undue influence of peer pressure, researchers found that following the pack in adolescence may have some unexpected health benefits for physical health in early adulthood.

"These results indicate that remaining close to -- as opposed to separating oneself -- from the peer pack in adolescence has long-term implications for adult physical health," Joseph Allen, a researcher at the University of Virginia, said in a statement. "In this study, it was a robust predictor of increased long-term physical health quality."

For the study, researchers collected and analyzed data from 171 seventh- and eighth-graders they followed from ages 13 through 27 years old, The Economic Times reported. They hypothesized that "following the herd" and having close, supportive relationships in adolescence would lower the risk of having stress-related health problems in adulthood.

The participant's health quality was evaluated annually at ages 25, 26, and 27 years old. They had to answer questions about their overall health, anxiety and depression symptoms, and body mass index.

They found that "both high-quality friendships and a drive to fit in with peers" were associated with better health at 27 years old, The Economic Times reported.

Based on their findings, researchers believe that adolescent relationship qualities may play a role in adult health through decreased levels of later anxiety and depressive symptoms.

"Although autonomy-establishing behavior is clearly of value in modern Western society, in which daily survival threats are minimal, it may have become linked to stress reactions over the course of human evolution, when separation from the larger human pack was likely to bring grave danger," Allen and colleagues write in the study.

Allen said that difficulty forming close relationships early in adolescence may now be considered a marker of risk for long-term health difficulties.

The findings are detailed in the journal Psychological Science.