A line of mostly students waits to vote at a Texas primary election polling site at the University of Texas in Austin in 2018. (Eric Gay/AP)

Texas state officials have agreed to stop efforts to investigate and purge tens of thousands of supposed noncitizens from the state’s voter rolls, part of a settlement reached Friday with numerous civil rights groups.

In January, Texas’s acting secretary of state David Whitley claimed state officials had identified nearly 100,000 people on their voter rolls as possible non-U.S. citizens. Whitley’s office subsequently provided lists of those voters to county election officials and directed them to “review” them for potential removal.

The American Civil Liberties Union of Texas, along with several other civil rights groups, filed a lawsuit against Whitley and other state elections officials, claiming that officials were aware the lists included naturalized citizens who were eligible to vote.

In February, a federal judge blocked the state’s efforts to remove people from its voter rolls, calling them “ham-handed” and “threatening.”

On Friday, the state agreed to rescind its efforts to investigate and remove any voters on those lists. Texas officials also agreed to a new process for maintaining its voter rolls, according to a copy of the settlement agreement.

The state will also be responsible for covering $450,000 in legal fees related to the lawsuit.

“After months of litigation, the state has finally agreed to do what we’ve demanded from the start — a complete withdrawal of the flawed and discriminatory voter purge list, bringing this failed experiment in voter suppression to an end,” Andre Segura, legal director for the ACLU of Texas, said in a statement. “The right to vote is sacrosanct, and no eligible voter should have to worry about losing that right."

Segura said the group would continue to monitor “any future voter purge attempt” by the state.

In a statement about the settlement, Whitley said it had been a “collaborative” process and vowed to protect voting rights of eligible Texans in the future.

“It is of paramount importance that Texas voters can have confidence in the integrity, accuracy and efficiency of the electoral system in which they participate,” he said. “Today’s agreement accomplishes our office’s goal of maintaining an accurate list of qualified registered voters while eliminating the impact of any list maintenance activity on naturalized U.S. citizens.”

Texas is just one of many states that has tried to show significant numbers of noncitizens are registered to vote, as The Washington Post’s Amy Gardner reported in February:

In North Carolina, legislative leaders said in 2014 that more than 10,000 suspected noncitizens were registered to vote, but state election officials found that number was vastly overstated and determined that only 11 noncitizens voted that fall. In Florida in 2012, a list of 180,000 possible noncitizens ultimately led to the removal of 85 voters from the rolls. Similar claims have been made in Colorado, Indiana and Kansas.

Those touting the large numbers, almost all Republicans, say the hunt for evidence of voter fraud is necessary to protect the integrity of elections. But the pattern of overblown proclamations also shows the data is easily misinterpreted — prompting voting rights activists to accuse Republicans of using the numbers to discourage eligible voters to cast ballots.

Texas Democrats attacked the attempted voter purge as “flawed, illegal and racist” and called on Texas Gov. Greg Abbott (R) to withdraw Whitley’s nomination for secretary of state.

“The work here is not done. We must remain vigilant,” Texas Democratic Party Chairman Gilberto Hinojosa said in a statement after the settlement. “The Texas Senate deserves the opportunity to vet a new secretary of state.”

Read more:

Inaccurate claims of noncitizen voting in Texas reflect a growing trend in Republican states

Judge blocks GOP effort to purge voting rolls in Texas, saying it is ‘ham-handed’ and ‘threatening’

In N.C., a surprise: In the end, everyone agreed it was election fraud