RALEIGH, N.C. (AP) – A federal appeals court has found that a North Carolina voter ID law was enacted “with discriminatory intent” and must be blocked.

An opinion issued Friday by a three-judge panel of the 4th Circuit Court of Appeals in Richmond reverses a lower-court’s ruling that had upheld the law.

The 2013 rewrite to voting laws in North Carolina required photo identification to cast in-person ballots and made other changes.

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