RALEIGH, N.C. — The North Carolina Supreme Court ruled Monday night that ballots must be reprinted without Robert F. Kennedy Jr.’s name on them, according to a court order.

The state Supreme Court ruled 4-3 to deny efforts by the State Board of Elections to have the justices consider overturning a Court of Appeals decision on Friday directing that Kennedy be removed from ballots. The State Board of Elections now must reprint the ballots without his name.

North Carolina’s ballots were supposed to be the first in the country to send out nearly three million ballots. A judge halted that mailing last week after a lawsuit filed by RFK Jr.’s campaign to remove his name.

The exact duration and expenses involved in printing and mailing the new ballots have not been officially announced.

Kennedy suspended his campaign more than two weeks ago and endorsed Republican nominee Donald Trump. The environmentalist and author has tried to get his name removed from ballots in several battleground states where the race between Trump and Democratic nominee Kamala Harris are expected to be close.

The Democratic majority on the elections board had rejected the request by We The People party of North Carolina — a recently certified party assembled to collect signatures for Kennedy’s candidacy — to withdraw Kennedy from the ballot. The board's majority said it was impractical given actions already completed to begin ballot distribution, including printing and coding tabulation machines. Kennedy sued the next day.

A state law had required the first absentee ballots to be mailed or transmitted to voters who have already asked for them no later than 60 days before the general election, or last Friday. If it had occurred on time, North Carolina would have been the first state in the nation to distribute ballots for the Nov. 5 elections.

The North Carolina Supreme Court ruling means elections officials will have to reprint ballots without Kennedy and reassemble absentee ballot packets. Over 136,000 absentee ballot requests had been made as of late last week. More than 2.9 million absentee and in-person ballots with Kennedy’s name on them had already been printed, according to the state board. Counties must pay for reprinting costs.

Monday evening's order, backed by four of the court's five Republican justices, said it's clear Kennedy resigned as a candidate and that a vote for him would not count.

State attorneys for the board have said it could take two weeks to get reprinted ballots out the door — threatening violation of a federal law requiring absentee ballots be sent to military and overseas voters already requesting them by Sept. 21.

“We acknowledge that expediting the process of printing new ballots will require considerable time and effort by our election officials and significant expense to the State,” the order reads. “But that is a price the North Carolina Constitution expects us to incur to protect voters’ fundamental right to vote their conscience and have that vote count.”

The court's two Democratic justices — Allison Riggs and Anita Earls — and Republican Justice Richard Dietz each wrote separate dissents. Riggs said the “whims" of Kennedy “have been elevated above the constitutional interests" of voters who wanted to vote as soon as possible.

After Monday night’s order, North Carolina board Executive Director Karen Brinson Bell told county election officials not to mail any ballots until a statewide date is set. A potential waiver of the Sept. 21 federal deadline may be necessary, she wrote by email.

In Michigan, Kennedy sued Secretary of State Jocelyn Benson, a Democrat, on Aug. 30 in an attempt to remove his name from the ballot so as not to siphon votes away from Trump, who won Michigan by about 10,000 votes in 2016. Monday’s decision reverses an intermediate-level Court of Appeals ruling made Friday. It ensures that Kennedy’s name will appear on voters’ ballots in Michigan despite his withdrawal from the race.

On the Michigan Supreme Court, justices nominated by Democrats currently hold a 4-3 majority. That court's order was unsigned, and two Republican-nominated justices wrote a dissenting opinion.

In separate statements, Kennedy attorney Aaron Siri criticized the Michigan ruling but said the North Carolina decision “will assure that nobody in North Carolina votes for a candidate who is no longer running in their state.”

Spectrum News 1's Dan Gray contributed to this report