RICHMOND, VA. (Reuters) - A U.S. appeals court on Thursday heard Virginia Democrats’ challenge to a Republican-backed state law requiring prospective voters to show approved photo identification before casting ballots.

An elections official demonstrates a touch-screen voting machine at the Fairfax County Governmental Center in Fairfax, Virginia. REUTERS/Jonathan Ernst

The three-judge panel from the Fourth Circuit Court of Appeals repeatedly questioned attorneys about similarities between Virginia’s 2013 statute and North Carolina’s photo ID law. The appeals court struck down the North Carolina law in July, ruling that it intentionally discriminated against minority voters.

The Virginia Democratic Party wants the law overturned, contending the measure was intended to counter its growing political clout in the state. Republicans say it was aimed at combating voter fraud.

Judge Dennis Shedd asked attorney Bruce Spiva, who represented opponents of the law: “Was it as egregious as North Carolina’s [law] was as seen by the court?”

“Yes, your honor,” said Spiva.

“Was the motive in Virginia as bad if not worse?” Shedd asked, referring to the intent of racism found by the court in North Carolina’s law.

“As bad, your honor,” Spiva said. He added that the law was especially burdensome for minorities and young people, who tend to vote Democratic.

Mark Hearne, who defended the state measure, said the Virginia photo ID law was different from North Carolina’s.

Among other factors, Hearne said, there had been “no evidence of discriminatory intent” as the court found in the North Carolina case.

The appeal ahead of the Nov. 8 elections is among several legal challenges around the United States to voter identification laws that were driven by Republicans, who argue that they prevent election fraud.

The appeals panel did not say when it might rule.

U.S. District Judge Henry Hudson in May had upheld the law passed by the Republican-led legislature and signed by then-Governor Robert McDonnell, also a Republican. He said the “inconvenience” to potential voters was not enough to merit striking it down.

Democrats have made gains in the state, once a Republican stronghold. President Barack Obama won the state in 2008, boosted by turnout among black, Latino and young voters, and again in 2012.

Virginia’s governor, lieutenant governor, attorney general and both U.S. senators are Democrats. Democratic presidential nominee Hillary Clinton also leads Republican opponent Donald Trump in Virginia opinion polls.

In the North Carolina case, the U.S. Supreme Court last month rejected a request by the state that the restrictions be reinstated for the Nov. 8 election.