North Carolina is in the middle of at least three very close elections. Not only do polls suggest the presidential race is nearly tied, but the candidates in the gubernatorial and US Senate races are only about 1 or 2 points away from each other.

North Carolina Republicans have so far handled the situation by trying to stop a bunch of black people and Democrats from voting.

This Wednesday, the NAACP took North Carolina county officials to court for trying to purge thousands of people from the voter rolls. The process for the purges had so few safeguards that US District Judge Loretta Biggs called it “insane,” saying it “sounds like something that was put together in 1901” — a time when mass suppression of black voters was common.

The process is shockingly simple: Any voter can challenge another county resident’s registration, which then leads to a formal hearing in which the challenger presents evidence that the registration is invalid. If local officials conclude there’s enough for probable cause, a challenged voter can be called to a hearing. But if challenged voters don’t turn up, they’re automatically stripped from the rolls. Obviously, this can have a disproportionate impact on poor, minority voters who just don’t have the time or the means to get to a hearing.

Through this process, North Carolina counties have so far removed nearly 7,000 people — largely black voters — from county voter rolls, out of the state’s 6.8 million registered voters. That doesn’t sound like much. But when three big elections seem to be virtually tied, any small change in the voter rolls might make a difference.

It would be one thing if this were the only thing North Carolina Republicans have tried to stop minority and Democratic voters from voting in 2016. But it’s not.

North Carolina Republicans have pulled off a series of voter suppression stunts this year

Earlier this year, the News & Observer obtained copies of emails sent by North Carolina Republican Party Executive Director Dallas Woodhouse to GOP county board members and other party members. In the emails, he asked county election boards to “make party line changes to early voting” to limit hours and keep polls closed on Sundays. (He later defended this to MSNBC by arguing the state has “a partisan system.”)

Woodhouse claimed that offering same-day registration and a lot of early voting created a situation that was “ripe with voter fraud.” The kind of fraud he was referring to — voter impersonation — is extremely rare: A study found 35 credible allegations of in-person voter impersonation from 2000 to 2014, a period when more than 1 billion ballots were cast. But Republican lawmakers frequently cite voter fraud as a reason to enact new voting restrictions and generally make voting more difficult — in a way that studies suggest disproportionately targets minority voters.

Woodhouse also said that a lot of people are upset at the idea of having to work the polls on Sundays. “Many of our folks are angry and are opposed to Sunday voting for a host of reasons including respect for voter’s religious preferences, protection of our families and allowing the fine election staff a day off, rather than forcing them to work days on end without time off,” he wrote in the emails. “Six days of voting in one week is enough. Period.”

Reuters reported that a few counties apparently followed the advice over the past few weeks, even as the state faces extremely long lines for voting in some places. Although the state is offering more early voting hours overall than it did in 2012, many counties have cut back on early voting sites as well as weekend and evening hours — times that tend to favor Democrats, particularly low-income, minority voters who may not be able to go to the polls in the middle of a workday.

This is what democracy looks like. pic.twitter.com/n40rvpAsly — Rachel Gurvich (@RachelGurvich) October 20, 2016

This bit of email advice was apparently a backup plan — coming after North Carolina got into trouble with the law for trying to make it harder for voters, particularly black people, to vote.

A few weeks before Woodhouse’s emails were sent out, a federal judge struck down voting restrictions passed in 2013 by Republican lawmakers. US Fourth Circuit Judge Diana Gribbon Motz concluded that the restrictions “target[ed] African-Americans with almost surgical precision.” The state basically admitted this in court, according to Motz’s ruling (emphasis mine):

As “evidence of justifications” for the changes to early voting, the State offered purported inconsistencies in voting hours across counties, including the fact that only some counties had decided to offer Sunday voting. … The State then elaborated on its justification, explaining that “[c]ounties with Sunday voting in 2014 were disproportionately black” and “disproportionately Democratic.” … In response, SL 2013-381 did away with one of the two days of Sunday voting. … Thus, in what comes as close to a smoking gun as we are likely to see in modern times, the State's very justification for a challenged statute hinges explicitly on race — specifically its concern that African Americans, who had overwhelmingly voted for Democrats, had too much access to the franchise.

One longtime Republican consultant in North Carolina also admitted as much to William Wan at the Washington Post:

Longtime Republican consultant Carter Wrenn, a fixture in North Carolina politics, said the GOP’s voter fraud argument is nothing more than an excuse. “Of course it’s political. Why else would you do it?” he said, explaining that Republicans, like any political party, want to protect their majority. While GOP lawmakers might have passed the law to suppress some voters, Wrenn said, that does not mean it was racist. “Look, if African Americans voted overwhelmingly Republican, they would have kept early voting right where it was,” Wrenn said. “It wasn’t about discriminating against African Americans. They just ended up in the middle of it because they vote Democrat.”

There’s really no doubt what North Carolina Republicans are trying to do here: They’re trying to skew the elections in their favor. They might cite election fraud, but it’s vanishingly rare, and other statements made to the press and courts tell another story. There is a clear pattern in what’s going on. (North Carolina Republicans did not respond to a request for comment.)

Much of the state’s ability to do this comes from a 2013 US Supreme Court decision. Back then, the court struck down parts of the Voting Rights Act that gave the federal government oversight over states with a history of voter suppression, such as North Carolina. That left the federal government without the power to stop new voting restrictions from going into effect, leaving North Carolina and other states with long histories of racial discrimination largely free to do as they please.

Now, the research shows that the latest Republican attempts to make voting harder, such as limits on early voting and voter ID requirements, have little to no effect on turnout. But, again, when elections are as close as the three major North Carolina races, a little effect can make the difference — especially if the restrictions manage to target a specific set of voters who tend to vote for a specific party.

So Republicans are pulling every trick they can. It might not be enough in the end, but it’s clear what they’re trying to do — deny just enough people their basic constitutional rights to maybe swing an election or two or three.

Watch: Americans with disabilities often struggle to get to the polls