Former President Donald Trump and Vice President Kamala Harris are locked in a tight race as the election approaches. The outcome will be dependent on many factors, including outreach and campaign messages, but another factor could be the extent to which states are purging their voter rolls.

Nearly every state conducts routine maintenance on its voter registration rolls to keep them up to date, prevent fraud and provide the public with assurance that the lists are accurate. Federal law requires that these cleanups be completed 90 days before an election, and some states are continuing their efforts beyond that deadline — putting themselves in the crosshairs of federal authorities.

The Department of Justice is suing Alabama for allegedly purging people from its rolls too close to the November election. More than 3,000 people in the state who had been given noncitizen identification numbers are among those being removed from Alabama’s registration list.

That applied to both native-born and naturalized U.S. citizens — both of whom are eligible to vote, according to the DOJ. The lawsuit is asking for the restoration of their voting status before Nov. 5.

“As Election Day approaches, it is critical that Alabama address voter confusion resulting from its list maintenance mailings sent in violation of federal law,” Assistant Attorney General Kristen Clarke, who heads the Justice Department’s Civil Rights Division, said in a statement.

Alabama Secretary of State Wes Allen said in a statement last week that it’s his “constitutional duty to ensure that only American citizens vote in our elections.” The Republican acknowledged that some of those who were included in the dragnet likely became naturalized citizens since receiving a noncitizen number, meaning they would need to update their information and have it verified.

A similar effort was made in Texas in 2019, when the state’s secretary of state announced the finding of 95,000 noncitizens on the voter rolls and gave the names to the Texas attorney general for possible prosecution for illegally voting. The state eventually discovered errors in voter data showing that tens of thousands of the voters were natural citizens. The secretary of state abandoned the review.

In Georgia, lawmakers passed a law in 2021 allowing citizens to file an unlimited number of challenges against fellow voters in their county. A CBS News investigation found some 80,000 challenges were filed, most by a small number of people.

About 15% of the challenges were upheld and resulted in voters being removed from the rolls, according to CBS News’ analysis. Local election officials say they were upheld because of administrative errors and technical violations, not evidence of fraud.

Much of the problem is a result of misinformation online, Karli Swift, chair of the election board in DeKalb County, Georgia, told CBS News.

“They truly believe there is fraud in the system, which is just not true,” she said, adding that that’s not a good reason to deprive someone of their right to vote.

There is no national database of registered voters or a national identification system that lets states confirm voter eligibility, so states typically make do with change-of-address forms or DMV records. These systems are not always accurate, however.

An eligible voter could share a name with someone who recently died or with a person who is not eligible in that same state and could be removed from the list based only on that coincidence. It’s a vulnerability that can disenfranchise thousands through a purge.

Many of those who have been removed from registration lists often don’t know they’ve been removed until they attempt to vote. If they live in any of the 28 states allowing same-day voter registration, then they can re-register to vote on the day they cast their ballot.

Half of the states in the country have implemented automatic voter registration, which keeps voter lists updated with current information when citizens interact with the DMV or other agency. This system helps officials tasked with maintaining overloaded rolls.

About 24 states participate in the Electronic Registration Information Center (ERIC), which was started in 2012 by Republican- and Democrat-led states and uses algorithms to share voter registration data between states to detect when someone has moved to a different state.

Without a national database, ERIC is the only data-sharing program states can use. Georgia officials credit ERIC for identifying 100,000 voters who are no longer eligible to vote in the state, according to The Associated Press. Maryland officials say the system identified 778,000 people who may have moved out of state since 2013.

ERIC is now funded through its member states. But Missouri and other states began leaving. And last year, Trump weighed in on his social media platform Truth Scoial, calling on all Republican-led states to “immediately pull out of ERIC, the terrible voter registration system that ‘pumps the rolls’ for Democrats and does nothing to clean them up.”