The law restricted early voting and ended same-day voting registration, voting outside of your precinct, and pre-registration for citizens younger than 18. It also required all voters present a photo ID.

Civil rights groups cried foul, saying the laws were clearly an effort to limit black suffrage by Republican governor Pat McCrory. Barber began regular protests against the law and others like it in 2013.

A district judge endorsed the law in April, but today (July 29) a US appeals court ruled (pdf) that North Carolina didn’t present evidence of a real problem with voter fraud, imposing “cures for problems that did not exist, “and that it illegally targeted African Americans.

“We recognize that elections have consequences, but winning an election does not empower anyone in any party to engage in purposeful racial discrimination,” judge Diana Gribbon Motz wrote in the opinion. “When a legislature dominated by one party has dismantled barriers to African American access to the franchise, even if done to gain votes, ‘politics as usual’ does not allow a legislature dominated by the other party to re-erect those barriers.”

The ruling will have political consequences almost immediately. North Carolina is a critical swing state in the presidential race, and also has a contested Senate race that could be pivotal in determining which party controls the legislature. More African American votes may help the state’s recent shift in favor of Democrats in national elections.

But more importantly, the case is part of a recent backlash against voting restrictions enacted across the country by Republicans in the wake of president Obama’s 2008 victory. Similar laws in Wisconsin and Texas have been rejected by courts in recent weeks.

📬 Sign up for the Daily Brief

Our free, fast, and fun briefing on the global economy, delivered every weekday morning.