A week after Robert F. Kennedy, Jr. suspended his third-party presidential campaign and endorsed former President Trump, he filed a lawsuit against the North Carolina State Board of Elections to get his name removed from the state’s ballot before November. 

When he suspended his campaign, Kennedy said he planned to keep his name on the ballot in safe Democratic and Republican states but didn’t want to be a spoiler in the battleground states. 

Recent polls have shown a close race between Trump and Vice President Kamala Harris in North Carolina. 

Kennedy’s lawsuit comes not long after he had been trying to get on the North Carolina ballot over the summer by seeking signatures for his We the People party. 

RFK JR. SAYS TRUMP HAS 'CHANGED AS A PERSON' AND ‘FOCUSED ON HIS LEGACY’

RFK Jr standing in front of an American flag

Robert F. Kennedy, Jr. speaks to reporters at the Nassau County Supreme Court in Mineola, N.Y., Aug. 21. (AP Photo/Stefan Jeremiah, Pool)

On Thursday, in a 3-2 vote, the elections board denied Kennedy’s request to have him removed there, arguing that nearly 2 million ballots have already been printed in 67 of 100 counties, and it would cost hundreds of thousands of dollars to redo them with the first deadline for absentee ballots on Sept. 6. 

ROBERT F. KENNEDY, JR. LAMBASTS ‘DNC-ALIGNED MAINSTREAM MEDIA,' ACCUSES THEM OF ENGINEERING HARRIS' RISE

RFK Jr. endorses Trump

RFK Jr. endorsed former President Trump last week after dropping out of the presidential race.  (Reuters/Go Nakamura)

"When we talk about printing a ballot, we are not talking about ... pressing ‘copy’ on a Xerox machine. This is a much more complex and layered process," Board Executive Director Karen Brinson Bell said.

"With the November election looming and ballot deadlines fast-approaching, Kennedy has no choice but to turn to this Court for immediate relief," his lawsuit said.

Robert F. Kennedy, Jr.

Kennedy suspended his fledgling campaign last week.  (Mario Tama/Getty Images)

It added that the election board’s decision violated his speech and state election law, The Charlotte Observer reported. 

Kennedy dropped out of the race and claimed he could still become president if neither Trump nor Harris reached 270 electoral votes. On Aug. 23, he joined Trump onstage at their first rally together.

CLICK HERE TO GET THE FOX NEWS APP

"Don't you want a president who's going to protect America's freedoms and who is going to protect us against totalitarianism?" Kennedy said at a rally in Glendale, Arizona. 

"Don't you want a safe environment for your children? Don't you want to know that the food that you're feeding them is not filled with chemicals that are going to give them cancer and chronic disease? And don't you want a president that's going to make America healthy again?" 

Kennedy's office did not immediately respond to Fox News Digital’s request for comment. 

The Associated Press contributed to this report.