A South Carolina voter-identification law does not discriminate against African Americans but must be delayed until next year because it would cause too much confusion at polling places so close to Election Day, a federal court ruled Wednesday.

In a unanimous ruling , a special three-judge panel found the law, which requires voters to display one of five types of photo identification, would not harm African Americans and was not enacted with discrimination in mind.

“South Carolina’s new voter ID law is significantly more friendly to voters without qualifying photo IDs than several other contemporary state laws that have passed legal muster,” wrote Brett M. Kavanaugh, a judge on the U.S. Court of Appeals for the D.C. Circuit. He was joined in his opinion by U.S. District Court judges Colleen Kollar-Kotelly and John D. Bates.

Although they determined the law was not discriminatory, the judges blocked it from being implemented until at least 2013, citing “the potential for chaos” if officials tried to enforce it for the Nov. 6 election.

It is the second recent ruling by a federal judicial panel weighing the legality of new voter-ID laws under a provision of the Voting Rights Act. A three-judge court in August struck down a Texas voter-ID measure, saying it would impose “strict, unforgiving” burdens on minorities.

The South Carolina law, passed last year, requires voters to present one of five forms of photo identification to cast a ballot: a South Carolina driver’s license, a state photo ID, a passport, a military ID, or a new form of free photo card obtained from a county election office. The law provides a caveat, known as the “reasonable impediment” provision, that allows voters to cast a ballot after signing an affidavit that explains why they did not obtain an ID.

Rick Hasen, an election-law specialist at the law school of the University of California at Irvine, said the judges’ ruling turned on how South Carolina officials have modified their interpretation of the law in a way that is less onerous to voters. For example, state officials said they would err on the side of voters who raise a “reasonable impediment” objection to obtaining photo ID.

“The law became much less strict and was one that all three judges could sign on to,” Hasen said.

The Justice Department in December rejected the South Carolina law under Section 5 of the Voting Rights Act, which requires federal approval of voting changes in states or localities that have a history of discrimination. South Carolina then sued the department, arguing that it needed the statute to deter voter fraud and to boost confidence in the electoral process.

South Carolina’s attorney general, Alan Wilson, hailed the ruling as “a major victory for South Carolina and its election process.”

The Justice Department issued a statement saying it was pleased that the court blocked the law for the coming election and “welcomes the court’s agreement that South Carolina’s law required broad modifications in order to respond to the serious concerns raised by the Attorney General that the law as written would exclude minority voters.”

The department said it intends “to monitor its implementation closely to ensure compliance with the court’s order.”

New voter-ID laws have set off intense political and legal skirmishes across the nation. Republicans have pressed for the adoption of such measures, saying they are needed to deter fraud; Democrats and civil rights groups have argued that there is little evidence of such problems and that the laws are designed to depress turnout among minority voters who tend to support their candidates.

A dozen states have adopted such measures in the past two years, though some have been successfully challenged in court. Last week, a Pennsylvania judge ordered the state not to impose its tough voter-ID law in next month’s elections; state judges in Wisconsin stopped a similar statute there. The Justice Department this year has approved less-onerous voter-ID laws in Virginia and New Hampshire, which are also covered by Section 5 of the Voting Rights Act.

Sari Horwitz contributed to this report.