CNN  — 

The Supreme Court on Wednesday allowed the counting of ballots in North Carolina received up to nine days after the election as long as the ballots are postmarked by Election Day, a victory for Democrats in another key state.

Republicans and the Trump campaign had asked the court to reinstate a deadline set in June by the state Legislature that allowed ballots to be received only up to three days after Election Day.

The ruling came shortly after the court left in place for now a Pennsylvania state Supreme Court decision that allowed the counting of ballots received up to three days after the election, even if there is no legible postmark.

Justice Amy Coney Barrett took no part in both the North Carolina and Pennsylvania decisions because she had not had time to fully review the briefs, the court said.

North Carolina Attorney General Josh Stein praised the court’s order, calling it a “huge win.”

“The Court upheld the State Board of Elections’ effort to ensure that every eligible vote counts, even during a pandemic,” he said in a statement.

There were two separate challenges, one brought by the Trump campaign and other Republicans and a second brought by Republican North Carolina legislators.

Tuesday’s orders did not specify a vote count. In both, Justices Samuel Alito, Neil Gorsuch and Clarence Thomas noted their dissent. It would have taken five justices to grant the Republicans’ request.

Election law expert Rick Hasen said there are some reasons why either Chief Justice John Roberts or Justice Brett Kavanaugh may not have sided with their conservative colleagues. He noted that the case was more complicated by procedural issues than other recent voting rights challenges before the justices. There may have also been an inclination not to change the rules too close to the election.

“Many voters have already made their voting plans dependent on the deadlines,” Hasen said.

A federal appeals court earlier this month had allowed the nine-day extension that was set by the State Board of Elections amid the pandemic, as part of a legal settlement.

“The extension simply makes it easier for more people to vote absentee in the middle of a global pandemic that has killed over 200,000 Americans, ” the appeals court ruled.

In their challenges to the state board’s action, Republicans argued the board had tried to “rewrite the election code” and to usurp the authority of the General Assembly, which had allowed only the three-day extension in June. In court briefs, Republicans’ lawyers said the board’s decision “undermines the equal protection rights of voters, and is already causing the voter confusion and chaos.”

Gorsuch, writing for himself and Alito, sided with the Republicans, stressing that only the state Legislature, not an unelected board, has the authority to set election rules.

“Everyone agrees,” Gorsuch wrote, “that the North Carolina Constitution expressly vests all legislative power in the General Assembly, not the Board or anyone else.”

Lawyers for the Democrat-led board had argued that the State Board of Elections was authorized by statute to adjust election rules to deal with exigent circumstances. The board had extended the deadline, they argued, “to protect lawful North Carolina voters from having their votes thrown out because of mail delays that the Postal Service had explicitly warned the State about.”

They reiterated that the extension does not affect the fact that the ballots must still be postmarked by Election Day.

This story has been updated with more details, analysis and reaction.