Civil rights groups announced a settlement Wednesday with Hancock County over allegations officials improperly removed African American voters from the rolls ahead of a hotly contested local election.

Groups including the Georgia NAACP and the national Lawyers’ Committee for Civil Rights Under Law filed a federal lawsuit against the county in December 2015 after hearing from concerned residents. The suit came after the county Board of Elections and Registration, which has a majority of white members, held a dozen hearings ahead of that fall’s election to challenge an estimated 174 of the 988 registered voters in the city of Sparta.

Nearly all of those challenged were black. In some cases, challenges were based on discrepancies in state databases. Others involved residents who had lived their whole lives in Sparta or had never moved out of the county. Others involved unsubstantiated “third party” allegations about individual residents. One elections board member issued her own challenges as a private citizen and then voted to approve those challenges as a member of the board.

Under the agreement, the county will no longer hear third-party challenges to voters’ eligibility and will no longer remove voters based on allegations of a change of address. It will instead follow federal law that requires a waiting period of two federal election cycles before officials may attempt to contact a voter to confirm their address.

The county has agreed to restore to the rolls all voters affected by the challenges who still live in the county. It has also agreed to make reports on local voter challenges to the Lawyers’ Committee for the next five years.

The agreement must be approved by a federal judge.

The elections board’s actions in 2015 came two years after the U.S. Supreme Court struck down a key provision of the federal Voting Rights Act. The provision would have otherwise required jurisdictions with a history of racial discrimination to seek approval before making changes to voting rules.

Hancock County, which also clashed with voter advocates over a 2015 proposal to close several polling locations near Sparta, was one of three Georgia counties where federal monitors were stationed during the 2016 presidential election.

A hacker compromised information from the center for election systems, housed at Kennesaw State University.