A study from Trinity College Dublin shows that people over 50 who regularly attend Mass have better mental health compared to those who don’t attend services.

The researchers followed 6,000 people aged 50 and over for a six-year period, during which the participants were interviewed at two-year intervals. The study forms part of a larger longitudinal study involving 80,000 participants across Ireland, TheJournal.ie reports.

The Irish Longitudinal Study on Ageing (TILDA) found that men and women who attended Mass on a regular basis reported lower depressive symptoms. Those who said they valued religion but did not attend regular religious services has higher depressive symptoms.

Read More: Advice on aging and life from Irish philosopher and former monk

The majority of the participants said religion as important to them, although more women (86 percent) than men (76 percent) said it was important to them.

Between 2010 and 2016, the years the study was conducted,  there was a slight decline in attendance with both sexes, UniversityTimes.ie reports. The percentage of women who attended services fell from 91 percent to 89 percent in women, and from 89 percent to 87 percent in men.

“We did see that people are attending mass less and that their social networks are getting smaller but that is to be expected in a way, because the study includes people who are in the over-80s and 90s group,” said Joanna Orr, the lead author of the study.

“The most important thing to come out of the study is that social engagement is important and that as we go forward, we have to think of ways as a society to enable people to be engaged,” Orr said.

Read More: Elderly Irish woman robbed while attending Mass

“That doesn’t need to be religion but for those who are religious we should be making sure they are engaged,” she added.

The research was published by the peer-reviewed academic journal Research on Aging.