The best way to ward off the common cold could be by getting a hug, according a new study.

Researchers from Carnegie Mellon University quarantined 406 people to hotel rooms and gave them nasal drops containing the cold and flu viruses before testing them for symptoms including their mucus content and how often they blow their nose, reported Washington Post

Prior to the quarantine the team assessed the number of hugs and how much personal interaction people experienced during a two-week period before they were exposed to viruses for the study. During the 14-day period the average person received at least one hug on 68 percent of the days. Of those receiving regular hugs, only 20 percent were married.

It appeared that those who were more stressed with little social support had a harder time warding off the disease, reported Washington Post. Reversely, people who said they had good social support or were receiving many hugs had a much easier time staying healthy. 

The data shows that "nonsexual physical touch, such as hugging, is a means of conveying empathy, caring and reassurance and that this implicit communication of affection and concern contributes importantly to the protective influence of perceived support against the pathogenic effects of stress," the researchers wrote in the study that was published in the journal Psychological Science

"A possible explanation for the buffering effect of being hugged is that hugs might be exchanged between individuals involved in a tension/conflict either as a means of resolving that conflict or as a counter to associated emotional after-effects," they concluded. "In predicting infection, we found that hugs on non-tension days were at least as important as those reported on tension days, thus suggesting that the buffering effects of hugging were not limited to hugs given as an immediate (same day) response to tension/conflict. These findings suggest that those who regularly receive hugs are more protected than those who do not."