Updated

A federal appeals court Friday struck down a North Carolina law requiring photo identification to cast in-person ballots, ruling that it was enacted "with discriminatory intent."

The opinion from a three-judge panel of the 4th Circuit Court of Appeals in Richmond, Va., reverses a lower court's ruling that had upheld the law.

"In holding that the legislature did not enact the challenged provisions with discriminatory intent, the court seems to have missed the forest in carefully surveying the many trees," the panel wrote in its opinion.

The opinion later states: "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."

There was no immediate comment from state officials, who were expected to ask either the full appeals court or the U.S. Supreme Court for a temporary stay, blocking enforcement of the ruling until further appeals can be filed.

North Carolina is also expected to appeal the case on its merits to either the full appeals court or to the Supreme Court.

North Carolina's voting laws were rewritten in 2013 by the General Assembly to include the ID requirement and other changes. The changes were enacted after Republicans took control of state government in 2011 for the first time in a century.

The U.S. Justice Department, state NAACP, League of Women Voters and others sued the state, saying the restrictions violated the federal Voting Rights Act and the Constitution.

"This is a strong rebuke to what the North Carolina General Assembly did in 2013. It's a powerful precedent that ... federal courts will protect voting rights of voters of color," said Allison Riggs, who served as the League of Women Voters' lead lawyer on the case.

The Rev. William Barber, president of the state chapter of the NAACP, said in an interview that the ruling was a powerful victory for civil rights and for democracy.

"It is a vindication of our constitutional and moral critique and challenge to the constitutional extremism of our government," he said.

Earlier this month, a federal appeals court ruled that Texas' strict voter ID law discriminates against minorities and must be weakened before the November elections. That followed a ruling by a federal judge in Wisconsin that residents without a photo ID in that state will still be allowed to vote in November.

An attorney representing the state had argued before the appeals court last month that the law's authors were aiming to prevent voter fraud and increase public confidence in elections.

The voter ID mandate, which took effect with this year's March primary, required voters to show one of six qualifying IDs, although those with "reasonable impediments" can fill out a form and cast a provisional ballot.

The laws approved by the General Assembly and signed by Republican Gov. Pat McCrory also reduced early voting from 17 to 10 days, eliminated same-day registration during early voting and barred the counting of Election Day ballots cast in the wrong precinct.

Plaintiffs had argued the changes discourage voting by black and Hispanic residents, who use early voting or same-day registration more than white voters and are more likely to lack photo ID.

The appeals court reverses a ruling by U.S. District Judge Thomas Schroeder, who determined in April that the plaintiffs failed to prove that the laws made it harder for minority voters to cast ballots.

The federal appeals panel disagreed with Schroeder in a sharply worded opinion.

"We recognize that elections have consequences, but winning an election does not empower anyone in any party to engage in purposeful racial discrimination," the panel said. "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."