The Justice Department has reached an $88 million settlement with the victims’ families and survivors of the Charleston, South Carolina church shooting that took the lives of nine parishioners.

Back in 2015, nine members of Mother Emanuel AME Church were fatally shot by 21-year-old Dylann Roof as they prayed during a Bible study session. He later confessed to the murders and said that he wanted to start a race war. The survivors and families of those who were killed filed a lawsuit against the FBI after it was revealed that their system used for conducting background checks failed to block the sale of the firearm Roof used in the shooting.

According to NBC News, Roof was previously arrested on a felony drug charge in Lexington County, South Carolina. The sheriff’s office reportedly told the FBI examiner administering the background check to reach out to the Columbia Police. However, the FBI’s databases revealed that the department in Lexington County had no arrest record of Roof. The examiner also called the prosecutor in Lexington County, but never heard back, according to the FBI. Just two months prior to the mass shooting, Roof purchased a Glock 41 at a shopping mall in Columbia — after his three-day waiting period for purchasing the gun expired.

In 2017, Roof was found guilty on 33 counts of federal hate crimes for the slayings, becoming the first person in the United States to receive a death sentence for those charges.

“The mass shooting at Mother Emanuel AME Church was a horrific hate crime that caused immeasurable suffering for the families of the victims and the survivors,” Attorney General Merrick Garland said. “Since the day of the shooting, the Justice Department has sought to bring justice to the community, first by a successful hate crime prosecution and today by settling civil claims.”

Of the $88 million settlement, $63 million will go to families of those killed in the shooting and $25 million will go to survivors.