The City of St. Louis has agreed to pay a $5 million settlement to a Black police officer who was beaten by white officers during a 2017 protest. At the time, officer Luther Hall was working undercover and attended a protest after the acquittal of an officer who killed a Black man.

In his lawsuit against the city, Hall said he was investigating protesters accused of damaging property downtown and attended the demonstration as an undercover officer. During the protest, five white officers belonging to the St. Louis City Police Department attacked Hall, leaving him with an injured tailbone and two-centimeter cut above his lips. According to local outlet KSDK, the 22-year department veteran had to undergo surgery to repair herniated discs in his neck and back after the beating.

Officers Christopher Myers, Dustin Boone, Randy Hays and Bailey Colleta were previously indicted on federal civil rights violations charges related to the incident. The fifth officer, Steve Korte, was also charged with a civil rights violation and with lying to the FBI.

In her guilty plea, Colletta said she and the other officers thought Hall was a protester when they confronted him. Federal prosecutors accused Boone, Hays and Myers of throwing Hall to the ground, kicking and hitting him with a police baton. Hall claims he did not hear police order him to kneel on the ground before they attacked him. In his lawsuit, he also said he saw police fire bean bag rounds and pepper spray at protesters for no reason.

St. Louis’ Ethical Society of Police, which was founded by Black officers to address racism within the department, supported Hall in a statement.

“Nothing will make Det. Luther Hall whole again. What he experienced was the epitome of evil from St. Louis City Police Department officers,” the group said. “We hope this settlement will help him heal somehow, and there will be settlements for the citizens who were also brutalized by SLMPD very soon.”

All of the officers involved in the incident, except Korte, are no longer employed by the department. Both Colletta and Hays are currently awaiting sentencing after pleading guilty to their charges, while the remaining officers pleaded not guilty and will be tried next month.

Hall is still a member of the department, though it’s unknown whether or not he’s been able to return to duty following his injuries. According to the agreement, the city has 45 days to pay him the $5 million settlement.