Republican state lawmakers passed the voting restrictions shortly after a 2013 Supreme Court ruling upended a long-standing piece of the Voting Rights Act that required a group of states, mostly in the South, to obtain approval before changing electoral practices because of their history of discrimination.

Critics said there was no actual evidence of voter fraud and the real motivation for the rules was to make it harder for voters that lean Democratic to cast a ballot. The state says it has appropriate voting safeguards in place and argued there was no evidence that the photo-ID requirement would burden voters.

The voter-id requirement went into effect this year and was used for the state’s primary on March 15.

Among other voting changes, North Carolina eliminated same-day registration and out-of-precinct voting and reduced the number of days in which citizens could vote early.

Judge Schroeder said the voter-id requirement contained ample exceptions that would prevent burdens on voters. He also said the state, even with the more restrictive voting rules, had many convenient registration and voting mechanisms in place. “There are simply very many easy ways for North Carolinians to register and vote,” he wrote.

Most North Carolina voters now need to show identification such as a driver’s license, passport, or military or veterans identification card. Some types of identification, like student IDs, aren’t accepted. There are exceptions to the law for people who declare they have reasonable impediment that prevents them from obtaining an acceptable photo ID.

North Carolina Gov. Pat McCrory, a Republican, said, “Common practices like boarding an airplane and purchasing Sudafed require photo ID and thankfully a federal court has ensured our citizens will have the same protection for their basic right to vote.”