Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Virginia Gov. Terry McAuliffe's controversial order giving more than 200,000 convicted felons the right to vote was struck down late Friday by his state's supreme court.

The decision could have an impact on the presidential election in one of the nation’s swing states. “The ruling gives Virginia Republicans a better shot at winning the state than they otherwise would have had,” said Mark Murray, NBC News Senior Political Editor.

Related: Could Voting Restrictions Be Trump's Ace in the Hole?

By a 4-3 vote, the court said McAuliffe's order exceeded his powers under Virginia's constitution. Because it was based on state — not federal — constitutional principles, the decision cannot be appealed to the U.S. Supreme Court.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

McAuliffe signed the order in April, restoring voting rights to some 206,000 state residents who had been convicted of a felony but had served their sentences. He said it was intended to remove a Civil war-era restriction that was aimed at disenfranchising African-Americans.

His move was an end-run around the Republican-controlled legislature, and the leaders of the state house and senate immediately sued.

The court said the Virginia governor — unlike the president under the federal Constitution — have no power to issue such a blanket order.

Related: Iowa Upholds Felon Voting Ban

"The clemency power may be broad, but it is not absolute," the majority opinion said. Written by the state's chief justice, Donald W. Lemons — and citing founders George Mason and Patrick Henry — it said none of Virginia's previous 71 governors had ever attempted such a move.

Under the Virginia constitution, no person convicted of a felony "shall be qualified to vote unless his civil rights have been restored by the Governor." The court said McAuliffe's order turned that notion around to say that all convicted felons shall be allowed to vote unless they are still serving their sentences.

The state constitution, the court said, requires the governor to notify the legislature each time clemency is granted, which it said was a further barrier to granting blanket forgiveness.

The court ordered Virginia election officials to cancel the registration of the roughly 11,000 convicted felons who signed up to vote after McAuliffe's order was issued.