(CNN) A federal appeals court Friday overturned parts of North Carolina's 2013 voting law, including provisions that required voters to show a photo identification card, saying they were enacted "with racially discriminatory intent" in violation of the Constitution and the Voting Rights Act.

"We cannot ignore the record evidence that, because of race, the legislature enacted one of the largest restrictions of the franchise in modern North Carolina history," 4th Circuit Court of Appeals Judge Diana Motz wrote.

This was the third federal court ruling against voter identification laws this month. The 5th Circuit Court of Appeals ruled July 20 that Texas' voter ID law violated the Voting Rights Act , and federal judges softened a Wisconsin law on July 19.

North Carolina Gov. Pat McCrory said the state would immediately appeal the decision.

"Photo IDs are required to purchase Sudafed, cash a check, board an airplane or enter a federal courtroom. Yet three Democratic judges are undermining the integrity of our elections while also maligning our state," McCrory, a Republican, said in a statement.

You needed a photo ID to be a delegate at the DNC Convention. Hypocrites! https://t.co/wy79vZGG6s #NCVoterID #ncpol — Pat McCrory (@PatMcCroryNC) July 29, 2016

'Almost surgical precision'

Besides eliminating voter ID requirements in North Carolina, Friday's ruling erases provisions that prohibited same-day registration and out-of-precinct provisional voting, as well as those that restricted early voting.

The court found that the North Carolina legislature enacted the provisions after it gathered data on the use, by race, of certain voting practices.

The provisions "target African-Americans with almost surgical precision" and "impose cures for problems that did not exist," the judges wrote.

In past 2 weeks, different Fed courts have ruled #GOPs #voterID laws are discriminatory and illegal in: WI, TX & now NC. #RestoretheVRA — Rep Donna F Edwards (@repdonnaedwards) July 29, 2016

Challengers of the law, including the Department of Justice and the NAACP, made the same argument. They said the law would have an outsized impact on the state's African-American population, who they said are more likely to vote during early-voting periods and use same-day registration.

Loretta Lynch praises ruling

As for the photo ID provision, the court found that the data examined by the legislature "showed that African-Americans disproportionately lacked the most common kind of photo ID, those issued by the Department of Motor Vehicles."

"The legislature amended the bill to exclude many of the alternative photo IDs used by African-Americans (and) retained only the kinds of IDs that white North Carolinians were more likely to possess," the ruling reads.

The law had been upheld by a district court judge in April , and North Carolina argued in court papers that the plaintiffs failed to prove the law was an "unconstitutional burden on any voters, much less African-American voters."

U.S. Attorney General Loretta Lynch praised the appeals court ruling, saying the law "sent a message that contradicted some of the most basic principles of our democracy. The ability of Americans to have a voice in the direction of their country -- to have a fair and free opportunity to help write the story of this nation -- is fundamental to who we are and who we aspire to be."

Republicans see political motive

Two leading North Carolina Republicans, state Senate Leader Phil Berger and state House Speaker Tim Moore, issued a joint statement that referenced upcoming elections.

"Since today's decision by three partisan Democrats ignores legal precedent, ignores the fact that other federal courts have used North Carolina's law as a model, and ignores the fact that a majority of other states have similar protections in place, we can only wonder if the intent is to reopen the door for voter fraud, potentially allowing fellow Democrat politicians like Hillary Clinton and Roy Cooper to steal the election," they said. "We will obviously be appealing this politically motivated decision to the Supreme Court."

Cooper is the Democratic state attorney general challenging McCrory for the governorship.

The American Civil Liberties Union applauded Friday's ruling.

"This ruling is a stinging rebuke of the state's attempt to undermine African-American voter participation, which had surged over the last decade," said Dale Ho, director of the ACLU's Voting Rights Project. "It is a major victory for North Carolina voters and for voting rights."