Facebook agreed to pay $52 million as part of settling a lawsuit alleging the social giant failed to protect content moderators who were exposed to child sexual abuse, beheadings, terrorism, and other disturbing content.

The settlement covers more than 10,000 current and former U.S.-based content moderators who worked for Facebook’s vendors in California, Arizona, Texas and Florida, according to attorneys for the plaintiffs. Facebook’s agreement to settle was first reported by the Verge, which previously extensively reported on the issue.

The class-action lawsuit, filed in September 2018 in a California state court, alleged that those who performed content moderation work on behalf of Facebook were denied protection against “severe psychological and other injuries” that can result from repeated exposure to graphic content.

In a statement about the settlement, a Facebook rep said, “We are grateful to the people who do this important work to make Facebook a safe environment for everyone. We’re committed to providing them additional support through this settlement and in the future.”

Under the terms of the settlement, affected content moderators will be eligible to receive $1,000 each. In addition, class members diagnosed with specified conditions as a result of their work — like post-traumatic stress disorder — will receive a payment that can go to medical treatment for that condition and may be eligible for additional damage awards of up to $50,000 each.

Facebook also agreed to employ new safety measures for U.S.-based content moderators working for its vendors. Those include requiring the third-party vendors to provide coaching sessions with licensed mental health counselors and other mental-health support, as well as enhancing review tools designed to make content moderators’ work safer.

“We are so pleased that Facebook worked with us to create an unprecedented program to help people performing work that was unimaginable even a few years ago,” attorney Steve Williams of the Joseph Saveri Law Firm, which served as co-lead counsel to the plaintiffs, said in a statement. “The harm that can be suffered from this work is real and severe. This settlement will provide meaningful relief, and I am so proud to have been part of it.”

The proposed settlement in the case, Scola v. Facebook Inc., was entered May 8 in the Superior Court of California for the County of San Mateo and still requires court approval. The plaintiffs are represented by law firms Burns Charest LLP  and the Joseph Saveri Law Firm.