Gov. Terry McAuliffe (D) holds up the order he signed to restore rights to more than 200,000 felons in Virginia at the Capitol in Richmond in April. (Mark Gormus /Richmond Times-Dispatch via AP)

The Supreme Court of Virginia heard oral arguments Tuesday in a case that could doom Gov. Terry McAuliffe’s order to restore voting rights to more than 200,000 felons ahead of the November general election.

An attorney for state Republicans challenging the Democratic governor argued that the move was an unprecedented and unconstitutional overreach, while an attorney for the state defended it is as a bold but legal use of McAuliffe’s power.

It was not clear which way the seven justices would rule. Much of the arguments focused on whether the GOP legislative leaders and voters could even challenge the restoration of voter rights in court.

Hanging in the balance is an order that McAuliffe casts as an important civil rights advance.

Virginia is one of 11 states that requires individual exemptions for ex-offenders to vote after completing their sentences, according to the Brennan Center for Justice. Until McAuliffe’s order, about a quarter of the state’s black population had been barred from voting because of convictions. Since the order, more than 11,000 felons have registered to vote.

Republican legislative leaders allege that McAuliffe issued the order as a way of boosting the number of Democratic voters in the crucial swing state, in part to benefit his close friend and presumptive Democratic presidential nominee Hillary Clinton. The governor denies this.

But the legal question before the court Tuesday was more narrow: Does the history and language of the governor’s clemency powers allow him to restore rights to an entire group of people? Or is he supposed to do it on a case-by-case basis?

The lawyer challenging the order argued that the governor’s order got it backward: The Constitution says felons shouldn’t vote, he argued, though the governor can give some people second chances.

“It is the exceptional felons that qualify for gubernatorial exceptions,” said Charles J. Cooper, who has defended conservative causes, such as banning same-sex marriage, before the U.S. Supreme Court.

The strongest evidence for this, Cooper said, was that no governor has done what McAuliffe has and that some even rejected his approach.

“Power does not lay dormant and unused for two and a half centuries,” Cooper said.

Sen. Timothy M. Kaine (D-Va.), the state’s previous Democratic governor and a possible Clinton running mate, decided against a broad voting rights restoration order in 2010 on the advice of Mark Rubin, his senior counsel, who told him such a move would be a rewrite of the law and Constitution.

McAuliffe’s Republican predecessor, Robert F. McDonnell, began to ease requirements for ex-offenders to regain voting rights in 2013, however. And McAuliffe ramped up that effort with his order.

Virginia Solicitor General Stuart A. Raphael, who represented McAuliffe in court, argued that nothing in the Constitution bars a governor from using clemency power to restore voting rights in one sweeping move. And he said that an action isn’t illegal just because it’s unprecedented.

“If the Constitution provides for the power, it doesn’t go away with nonuse,” said Raphael.

Raphael wanted the lawsuit thrown out, arguing that the plaintiffs could not show they were harmed. He warned the justices that allowing the challenge to continue would mean “any voter is going to be able to challenge virtually any election law.”

It’s not clear when the state Supreme Court will issue a ruling, but lawyers expect a decision before the November election.

State officials say a loss before the Supreme Court would not have any major practical effect, because the governor would issue hundreds of thousands of individual orders to restore voting rights — essentially achieving the same goal.

Justice Stephen R. McCullough, installed on the court by Republican lawmakers in March after a protracted power struggle with the governor, was among the toughest critics of the state’s position on Tuesday.

The court’s two African American justices — Bernard Goodwyn and Cleo Powell — were appeared skeptical of the plaintiff’s case.

Several justices criticized the state for keeping the list of 206,000 newly eligible voters secret, which critics say has obfuscated problems with the order, such as the restoration of rights to several violent felons still in prison or on parole, and to 132 sex offenders under involuntary supervision.

McAuliffe’s order also made it simpler for felons to apply for the right to possess guns, in addition to making them eligible for jury duty and to run for public office.

Matt Moran, a spokesman for House of Delegates Speaker William J. Howell (R-Stafford), said those errors would have been avoided had McAuliffe scrutinized each case.

“All of the mistakes are case-in-point about why he needs to do an individual order,” Moran said. “He will be held accountable for every single order he signs.”

Activists around the country are pushing to eliminate voting restrictions on former prisoners, which they say amounts to a new disenfranchisement of black voters who are disproportionately incarcerated.

Democrats in Maryland went further than McAuliffe this year when they allowed more than 40,000 felons still on probation or parole to cast ballots, overriding Republican Gov. Larry Hogan’s veto.

While Howell said the issue of African Americans losing voting rights is one for Virginia’s legislature to address, the House speaker demurred when asked what lawmakers should do about it.

“I only have one vote,” said Howell after the court hearing. “I suspect we’ll look at it again this year, and we’ll continue to look at it again in the 2017 session.”