A divided U.S. Supreme Court refused Wednesday to reinstate North Carolina's voter identification requirement and keep just 10 days of early in-person voting.

The decision — a victory for voting rights groups and President Barack Obama's Justice Department — means voters won't have to show one of several qualifying photo IDs when casting ballots in the presidential battleground state. Early voting also reverts to 17 days, to begin Oct. 20.

The court rejected a request by Republican Gov. Pat McCrory and other state officials to delay a lower court ruling that found the state law was tainted by racial discrimination.

"Hundreds of thousands of North Carolinians will now be able to vote without barriers," Allison Riggs, an attorney representing some of the groups and voters who originally sued over the 2013 law, said in a release.

The 4th U.S. Circuit Court of Appeals struck down several parts of the law July 29, saying they were approved by Republican legislators in 2013 with intentional bias against black voters. Lawyers for McCrory and the state officials disagreed with the 4th Circuit ruling that there was "discriminatory intent" in passing the law and wanted a delay while they drafted an appeal.

The high court divided 4-4 on most of the challenged provisions, with the four more conservative justices supporting the state's bid to enforce them in the upcoming election. The split illustrates again how closely divided the Supreme Court is on voting rights and how the outcome of the presidential election essentially will determine the court's direction.

The court has been operating with only eight members since Justice Antonin Scalia died in February.

A ninth justice chosen by Democrat Hillary Clinton would almost certainly vote with the court's liberal justices on this issue. A justice picked by Republican Donald Trump would likely be a majority-making fifth vote for conservatives.

McCrory, who signed the law, said in a statement that North Carolina "has been denied basic voting rights" by the decision and that "four liberal justices" had "blocked North Carolina protections afforded by our sensible voter laws."

The voting adjustments could benefit Democrats in the November election, since registered Democrats historically have favored using early voting. Evidence presented during the trial over the 2013 law says black residents disproportionately lack photo ID. Black voters traditionally have voted overwhelmingly Democratic in North Carolina.

Attorneys who sued over the law — representing the U.S. government, the state NAACP, other groups and voters — told the justices last week keeping voter ID and 10 days of early voting in place would irreparably harm minority voters.

About 900,000 people voted in North Carolina in the first week of a 17-day early voting period in the 2012 presidential election. Fifty-six percent of state voters in that election cast early in-person ballots.

State NAACP president Rev. William Barber declared the ruling "another major victory for justice" that allows people to vote without "expansive restrictions by racist politicians or racist policies."

Voter ID was required during primary elections this year and 10 days of early voting had been in place since 2014.

McCrory and Republican legislative leaders have said voter ID is a sound requirement to increase the integrity of elections. Appeals court judges said the state provided no evidence of the kind of in-person voter fraud the ID mandate would address. The law was amended last year to include a method for people unable to get a photo ID to still vote.

Republican House Speaker Tim Moore and Senate leader Phil Berger said in a statement they were disappointed in the ruling and pointed out more than 30 other states have a voter ID requirement. "We'll continue to fight to restore this commonsense measure," Moore tweeted.

A trial court judge in April had upheld the law, but the 4th Circuit panel wrote he seemed "to have missed the forest in carefully surveying the many trees" by failing to recognize a link between race and politics in North Carolina.

The challenged provisions "target African Americans with almost surgical precision," said the 4th Circuit ruling, which also struck down provisions eliminating same-day registration during the early voting period and the counting of Election Day ballots cast by a person outside of their home precinct. The state didn't ask the Supreme Court to restore these provisions.

The court's action also means a voting "preregistration" program that readies 16- and 17-year-olds to cast ballots when they turn 18 is re-instituted. The 2013 law had ended the program.

Since the 4th Circuit decision, some GOP-controlled county election boards have approved 17-day early voting schedules that scale back the number of voting hours or anticipated early-vote sites. The State Board of Elections will decide whether they stand.