A man approaches a voting booth at a polling station in Centreville, Va., during primary voting on Super Tuesday, March 1, 2016. (Paul J. Richards/AFP/Getty Images)

The shadow of North Carolina’s strict voting rules hung over a federal court hearing Thursday about a Virginia law where lawyers were repeatedly asked whether the state’s requirements are just as bad.

The case involving Virginia’s voter-identification law comes two months after judges on the same appeals court threw out North Carolina’s far-reaching voting restrictions, finding North Carolina legislators had intentionally made it more difficult for minorities to cast ballots.

At the U.S. Court of Appeals for the 4th Circuit on Thursday, lawyers in the Virginia case quickly found themselves in the middle of a comparison to North Carolina.

“Is what Virginia did just as egregious?” Judge Dennis W. Shedd asked the attorney for the state Democratic Party that brought the challenge to Virginia’s photo-identification requirement. “Is the evidence of intentional discrimination as strong?”

Attorney Bruce V. Spiva said the law is “just as bad” because of its disparate impact on minority voters who he said are less likely than white voters to have the required identification.

This year more states than ever will require potential voters to show photo ID in order to vote in the election. Here's why this is so controversial. (Monica Akhtar/The Washington Post)

Lawyers defending Virginia’s law said the state’s system is far more flexible than voting measures in other states and was not designed to discriminate.

“Virginia is not Texas or North Carolina or, for that matter, Indiana. Virginia adopted one of the nation’s most lenient photo-ID laws,” Mark F. “Thor” Hearne II, the attorney for the State Board of Elections, said in his court filing.

The challenge to the voting rules in a key presidential election state is one of a series of similar cases throughout the country. Judges have repeatedly sided with opponents of new requirements in recent months, overturning or weakening restrictive voting laws.

In 2012, Virginia lawmakers passed new election rules that required voters to present identification — with or without a photo. The state mailed voter-registration cards, which could be used to cast ballots, to all registered voters.

Ten months later, the Republican-controlled legislature approved a more restrictive measure requiring photo identification for in-person voting.

A federal judge in May upheld Virginia’s law, finding the state had “provided all of its citizens with an equal opportunity to participate in the electoral process” and that the voting rules are constitutional and do not violate the federal Voting Rights Act.

Virginia’s law allows for alternatives to driver’s licenses and passports, including presenting private- and government-employer IDs and student IDs. A voter without the required photo identification can cast a provisional ballot and obtain a free voter identification card from a local election office.

In court Thursday, Judge Paul V. Niemeyer asked, “Why is it discriminatory to say, ‘Everybody who votes has to have a photo ID, period?’ ”

“Everyone can vote in this case. All you need to do is give some information,” he said, making note of the minimal requirement to obtain the free ID.

Spiva responded that the notion of “all-you-have-to-do is actually quite burdensome, particularly for minorities and young people” who may lack the time or available transportation to visit a registrar’s office.

Requiring photo ID is “ just a hurdle in the way,” Spiva said.

The panel hearing the case on Thursday also included Judge G. Steven Agee. All three judges were nominated by Republican presidents.

A different 4th Circuit panel found in the North Carolina case that the state’s legislature had intentionally enacted voting restrictions to stop the growing political power of African American voters, who turned out in record numbers for President Obama.

The North Carolina provisions “target African Americans with almost surgical precision,” wrote Judge Diana Gribbon Motz.

Unlike North Carolina’s voting rules, Virginia’s law was passed before the Supreme Court’s decision in Shelby County v. Holder. That 2013 decision freed certain states that had a history of discrimination from seeking federal approval before changing their voting rules.

There is no evidence, according to lawyers for the Virginia state elections board, that any lawmakers knew or believed that the photo-ID measure “would have a racially disparate impact or that there was a racial disparity in the possession of qualifying IDs.”

After the hearing Thursday, Del. Robert B. Bell (R-Albemarle) told reporters that the lower-court judge “didn’t find a whiff of racial intent” by the legislature.

“We were trying to prevent voter fraud and we tried to make it as easy as possible for people to get ID,” he said.