A federal appeals court has upheld a Virginia law requiring voters to show photo identification at the polls, rejecting a challenge from Democrats who argued that it suppressed voting by minorities and young people.

A three-judge panel of the fourth US circuit court of appeals ruled on Tuesday that the law did not violate the Voting Rights Act or impose an unconstitutional burden on the right to vote.

The ruling comes just months after a different panel of the same court struck down a North Carolina law that required voters to produce a photo ID and also scrapped same-day registration and shortened early voting periods. But the panel that issued Tuesday’s ruling found that the facts in the North Carolina case “are in no way” like those in the passage of Virginia’s bill.

Virginians can obtain free photo IDs at voter registrar offices, but Democrats argued that few people knew about that option because the state had done little to spread the word.

Bruce Spiva, an attorney for Virginia Democrats, told the court in September that the law was passed for a single purpose: to make it more difficult for black people, Latinos and young people to vote. Democrats claimed the photo ID law was a response to shifting demographics that helped Barack Obama win Virginia in back-to-back elections.

But the panel disagreed, writing that “the law was passed by the Virginia legislature through the normal legislative process, and that process was unaccompanied by any facts or circumstances suggesting the presence of racially discriminatory intent”.

Emily Bolton, communications director of the Democratic party of Virginia, said the party was disappointed by the court’s decision and was still determining its next steps in the litigation.

“We remain fully committed to fighting unnecessary burdens on the right to vote in the commonwealth,” she said.

A spokesman for the Virginia department of elections didn’t immediately return a call seeking comment.

Virginians have had to show some form of identification to vote for decades, but until 2012, people without an ID were still allowed to cast a ballot if they signed a form swearing they were the person they claimed to be. A 2012 law scrapped the affirmation of identity option, but allowed voters to use certain non-photo IDs. A year later, the GOP-controlled general assembly passed the law requiring photo IDs.

Virginia is among seven states with what the National Conference of State Legislatures considers to be “strict” photo ID laws because voters without identification now must cast a provisional ballot and take additional steps in order for their votes to be counted.

Much of the debate before the fourth circuit centered on how Virginia’s law and its implementation differed from North Carolina’s.

The ruling striking down North Carolina’s law said it targeted black voters with “almost surgical precision” and did nothing to prevent potential voter fraud.

An attorney for the Virginia department of elections stressed in September that the Virginia law, which a federal judge upheld in May, was quite different. Attorney Thor Hearne II said the list of IDs Virginians can use is “very generous” compared to other states, in that it includes those from places such as private colleges.

The fourth circuit noted in its ruling that the Virginia legislature “went out of its way to make its impact as burden-free as possible. It allowed a broad scope of IDs to qualify; it provided free IDs to those who lacked a qualifying ID; it issued free IDs without any requirement of presenting documentation; and it provided numerous locations throughout the State where free IDs could be obtained”.

Hearne noted that the court found North Carolina had asked for data on voting practices broken down by race while examining the bill. North Carolina’s law was also passed shortly after a US supreme court ruling changed the requirement that many southern states receive federal approval before changing voting laws. Virginia’s law was passed before the supreme court case was decided.