“I will never be able to hold her again, but I forgive you,” a daughter of one victim said. “We have no room for hating, so we have to forgive,” said the sister of another. “I pray God on your soul.”

Given the heinous nature of the crime, the willingness of Charleston’s survivors to forgive was remarkable—and earned particular praise from President Obama. But the act of forgiving is more than just an expression of grace toward a wrongdoer. It’s also an effective tool in helping individuals and communities touched by tragedy accelerate the healing process.

In March, the Atlantic’s Olga Khazan profiled Everett Worthington, a professor of psychology at Virginia Commonwealth University whose mother was brutally murdered in a 1995 burglary. As it happened, Worthington’s own research examined the effects of forgiveness. So in the days after his mother’s death, he decided to employ a five-step process he had previously devised:

First, you “recall” the incident, including all the hurt. “Empathize” with the person who wronged you. Then, you give them the “altruistic gift” of forgiveness, maybe by recalling how good it felt to be forgiven by someone you yourself have wronged. Next, “commit” yourself to forgive publicly by telling a friend or the person you’re forgiving. Finally, “hold” onto forgiveness. Even when feelings of anger surface, remind yourself that you’ve already forgiven.

Worthington found that his approach worked—and that other examples confirmed his intuition. Studies have shown that forgiveness aids mental and physical health, while the opposite reaction—holding a grudge and harboring resentment—has the opposite effect. This can also be applied to entire communities touched by mass tragedy. In 2006, 32-year-old Charles Roberts stormed into a one-room schoolhouse in an Amish community in Nickel Mines, Pennsylvania and shot ten girls, killing five before turning the gun on himself. Despite enormous shock and grief, several of the victims’ family members appeared at the killer's funeral just days later. When Roberts’ aggrieved mother then announced plans to leave the community, relatives of the dead persuaded her to stay. Seven years later, CBS News reported that the elder Roberts had become the primary caregiver for a girl her son had wounded in the attack.

“Is there anything in this life that we should not forgive?” said Roberts.

An individual or community’s gift of forgiveness, however, does not obviate a society’s demand for justice. In a 2014 case described by the Atlantic’s Andrew Cohen, a Colorado prosecutor seeking the death penalty for a prison inmate charged with murdering a corrections officer engaged in a contentious dispute with the victim’s parents, who opposed capital punishment. After months of back and forth, the prosecutor finally agreed to forgo the death penalty. The defendant, whose attorneys believed him to suffer from mental illness, ultimately pled guilty and is now serving a life sentence.

In the wake of the Charleston murder, South Carolina governor Nikki Haley said that the state would “absolutely want” the death penalty for Dylann Roof. Even Roof’s own uncle said he would support his nephew’s execution, telling reporters that he’d volunteer to “be the one to push the button.”

Several months—at the very least—will pass before a judge determines Roof’s fate. But the decision of the victims’ relatives to forgive may ease some measure of their pain.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.