LANSING, Mich. (AP) — The Michigan Supreme Court ruled Monday that Robert F. Kennedy Jr. will remain on the state's November presidential ballot, ending Kennedy's efforts to withdraw his name to help support former President Donald Trump.

Kennedy suspended his third-party presidential campaign and endorsed Trump in August. He 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 the valuable battleground state despite his withdrawal from the race.

The court said in a brief order that Kennedy “has not shown an entitlement to this extraordinary relief, and we reverse.”

“This plainly has nothing to do with ballot or election integrity,” Kennedy's attorney, Aaron Siri, said in a written statement. "The aim is precisely the opposite — to have unwitting Michigan voters throw away their votes on a withdrawn candidate.”

Angela Benander, spokesperson for Benson's office, said the department is grateful for the high court's “swift response.”

“Clerks can now move forward with the ballot printing process to ensure absentee ballots will be delivered to voters by the federal deadlines,” Benander said in a written statement.

Kennedy is attempting to withdraw his name from states where the presidential race will be close in November. He had scored a legal victory in North Carolina and suffered a setback in Wisconsin Friday.

Justices nominated by Democrats currently hold a 4-3 majority on the Michigan Supreme Court. The order was unsigned and two Republican-nominated justices wrote a dissenting opinion.

“We can only hope that the Secretary’s misguided action — now sanctioned with the imprimatur of this Court — will not have national implications,” the dissenting justices wrote.

Kennedy was nominated for president by the Natural Law Party in Michigan. Benson had previously cited a state law saying candidates who are nominated and accept a minor party’s nomination “shall not be permitted to withdraw.”