No one expects their church to become the target of an attack—especially not the kind of spare-no-one shooting that took place Sunday at a Southern Baptist church in rural Texas.

A gunman shot nearly 50 worshipers, 26 fatally—a figure that nears the total attendance at First Baptist Church of Sutherland Springs many weeks. For survivors and their neighbors, it’s the kind of unimaginable tragedy that will change their small single-stoplight town forever.

However, recent research around mass shootings indicates that people of faith, particularly those who receive support from their churches and religious communities, fare better in their recovery.

“Finding comfort in one’s faith and faith community is particularly important to helping mass shooting survivors hold onto hope amidst such horrible tragedies,” said Jamie Aten, executive director of the Humanitarian Disaster Institute (HDI) at Wheaton College. “Now is the time for First Baptist Church and surrounding churches to gather, pray, and lament in community.”

The first in-depth empirical studies examining faith and mass shootings—which HDI presented during the American Psychological Association convention last year—found that faith communities that rally together in the wake of a mass shooting make a measurable difference in the lives of survivors.

After a mass shooting, people who felt supported by their religious communities ultimately experienced fewer symptoms of depression and post-traumatic stress disorder (PTSD), and their faith didn’t suffer as much.

The research—which studied recovery efforts from shootings over the past two years in Orlando, Dallas, and Roseburg, Oregon—is currently under review, but already points to promising takeaways for how churches can help, whether the tragedy happens within their sanctuaries or not.

“These findings suggest that people in communities affected by mass shootings who identify as a person of faith or are open to faith would benefit from being encouraged to utilize their religious community as a source of social and religious support,” said Aten. “Helping to connect people for whom it is appropriate to support from their religious communities would appear to help buffer against common negative mass trauma reactions, placing them on a better trajectory for recovery.”

Even in the worst of times, Christians like those mourning in Sutherland Springs may have a few factors working in their favor, including a community to rally around them in their suffering and a view of God as caring and comforting.

The power of church community

Typically, the greater the loss a person suffers, the worse their psychological and spiritual outlook as a result. After a mass shooting, those affected by the tragedy may experience fear, stress, PTSD, anxiety, anti-social behavior, substance abuse, and “prolonged and complicated grief,” according to recent research by psychologists at the University of North Texas.

But researchers found that after a mass shooting, similar to what studies show in the wake of natural disasters, “religious support buffers the deleterious relationship between resource loss and negative outcomes.”

That means, even when the suffering is greater, survivors with high levels of support from their faith communities don’t show the level of worsening symptoms experienced by people without such community.

Already, nearby churches, denominational leaders, and national ministries like the Billy Graham Evangelistic Association have begun reaching out to families shaken by Sunday’s shooting—offering a place to gather, prayers, counseling, and other support.

“It impacts us all, as a family,” Lee Rios, pastor of Emerge Ministries near Sutherland Springs, told the AP. “It causes us to stop what we’re doing, start to pray, and see how we can serve. This community is rallying around these folks, and we’re just trying to comfort and minister how we can.”

The findings on improved outcomes among faith communities are based on a survey following the 2015 shooting at Umpqua Community College in Roseburg, Oregon. Researchers recruited participants to complete an online survey from a church that responded to the shooting, which killed nine and injured eight. (The sample size was small, and respondents were not all present on campus during the event.)

Joshua Hook, one of the study’s authors, said future research could reveal “what specifically in regard to religious/spiritual support is helpful, as well as if certain types of religious/spiritual support might even exacerbate negative symptoms—[for example], telling someone God is going to work good out of the tragedy in an insensitive manner.”

God as ‘ever-present’ in trouble

Hook and fellow psychologists have also studied how attitudes towards God after a mass shooting—whether survivors are tempted to blame him for the event or seek him out as a source of strength in the aftermath—impacts people’s ability to cope and recover.

“Our findings suggest that perceiving the shooting as divine judgment, feeling abandoned by God, or concluding that he is punishing, absent, or untrustworthy is associated with greater depression, anxiety, post-traumatic symptoms, and search for meaning,” said Laura Captari, part of a team of researchers analyzing responses to shootings that killed five Dallas police officers and injured eight more.

“In contrast, looking to God for strength, support, and guidance, and experiencing him as ‘ever-present help in trouble’ (Ps. 46:1) is associated with less anxiety and depression, as well as greater meaning and psychological stability.”

Joe Holcombe, the father of a Sutherland Springs’ associate pastor who was killed as he prepared to preach on Sunday, told The Washington Post that his family was looking to the Lord. The Holcombs lost three generations: their son and his wife, their grandson, and their great-granddaughter.

“God will see us through,” he said. “We’ll all be together soon.”

In the shock and emotions immediately following a shooting, it can be hard to know how a person feels. Captari suggested:

It is important to avoid telling people what to feel or think about God. Avoid theological debates and cliché Christian responses. Instead, offer your presence. Take time to listen and validate their pain, confusion, anger, and inner turmoil.

Their questions about God are real and important, but don’t feel as if you must provide the ‘right’ answer. Instead, show them that God is safe, caring, and present—not judgmental or distant—by embodying that in your own safe and caring presence.

Aten recommended some phrases to avoid in the wake of mass shootings, tragic deaths, or other traumatic incidents (e.g. “God only tests the strong,” or “It could be worse”) in an earlier post.

HDI will continue to collect data on coping in religious communities following this year’s major incidents, including the Charlottesville rally, the Las Vegas mass shooting, and Sunday’s church attack in Texas.

CT previously reported on research showing how gratitude can fuel resilience and growth in the wake of mass shootings, protecting against PTSD. Aten also reflected on the faith that helped him face both personal disasters and natural disasters in the June issue of CT.