WINSTON-SALEM, N.C. (Reuters) - A federal judge upheld a North Carolina law on Monday that requires voters to show certain forms of photo identification at the polls, in a key victory for Republicans in a presidential election year who say the law is needed to prevent fraud.

Am election worker checks a voter's drivers license as North Carolina's controversial "Voter ID" law goes into effect for the state's presidential primary election at a polling place in Charlotte, North Carolina March 15, 2016. REUTERS/Chris Keane

The case tested a central piece of broad voting restrictions passed after the U.S. Supreme Court ruled in 2013 that North Carolina and other states with a history of discrimination no longer needed federal approval for voting law changes affecting minorities.

In siding with Republican Governor Pat McCrory and other state officials in dismissing challenges to the law, U.S. District Judge Thomas Schroeder in Winston-Salem wrote in a 485-page ruling that North Carolina “has provided legitimate state interests for its voter-ID requirement and electoral system.”

“In sum, plaintiffs have failed to show that any North Carolinian who wishes to vote faces anything other than the ‘usual burdens of voting,’” Schroeder wrote.

The National Association for the Advancement of Colored People and individual voters backed by the U.S. Justice Department had argued that the law disproportionately burdened African-Americans and Hispanics, who are more likely than whites to lack the acceptable forms of identification.

Democrats argue voter ID laws passed by Republican-led state legislatures target voters who typically support the Democratic party. Proponents of the measures say they are intended to prevent voter fraud.

The trial in Winston-Salem was one of a number of closely watched voting rights battles across the country playing out as Democrats and Republicans fight for the White House in November.

Governor McCrory, locked in a tough race for re-election this year, said in a statement: “This ruling further affirms that requiring a photo ID in order to vote is not only common-sense, it’s constitutional.”

The North Carolina law requires voters to show approved credentials such as a driver’s license or passport before casting a ballot. Voters who cite a “reasonable impediment” to obtaining such identification are allowed to cast a provisional ballot.

Schroeder also upheld provisions that eliminated a week of early voting, same-day registration, and prohibited the counting of out-of-precinct ballots.

Schroeder said that the plaintiffs did not establish that blacks or Hispanics had less opportunity than others to participate in the electoral process, and pointed out that North Carolina joins only South Carolina in extending voters the “reasonable impediment” accommodation.

Opponents of the law said they would pursue an appeal.

William Barber, president of the North Carolina State Conference of the NAACP, called the “restrictive provisions” in the law “an affront to democracy” and vowed to continue the fight against “regressive and discriminatory voter suppression tactics.”