The U.S. Supreme Court unanimously ruled Monday that Donald Trump can stay on the 2024 Colorado election ballot, handing the leading Republican presidential candidate a key victory a day before the western state and 14 others vote in Super Tuesday party primary elections.

The ruling reversed a decision by the Colorado Supreme Court that Trump was ineligible to appear on the state’s ballot because of his role in helping foment the Jan. 6, 2021, riot at the U.S. Capitol, which some Trump critics allege violates the U.S. constitutional provision prohibiting insurrectionists from holding public office.

After Trump told his supporters to “fight like hell” at a rally near the White House, hundreds of them rampaged through the Capitol, ransacking some congressional offices and scuffling with police as they tried to keep Congress from certifying that he had lost his 2020 reelection bid to Democrat Joe Biden.

But the nine Supreme Court justices, in an unsigned, 13-page opinion, said the Constitution does not permit a single state to disqualify a presidential candidate from national office.

The court said only Congress is vested with such power, not any of the 50 individual states. The court warned there could be chaos if a candidate for national office could be declared ineligible in some states, but not others, based on the same conduct.

“Nothing in the Constitution requires that we endure such chaos — arriving at any time or different times, up to and perhaps beyond the inauguration” of a new president, the court said. The next U.S. presidential inauguration is set for Jan. 20, 2025.

“BIG WIN FOR AMERICA!!!” Trump wrote on social media.

FILE - Then-President Donald Trump holds a campaign rally in Colorado Springs, Colorado, Feb. 20, 2020.

FILE – Then-President Donald Trump holds a campaign rally in Colorado Springs, Colorado, Feb. 20, 2020.

While the court was unanimous on the idea that Trump could not be unilaterally removed from the ballot, the justices were divided about how broadly the decision should reach. A 5-4 majority said that no state could remove a federal candidate from any ballot, but four justices said that the court should have limited its opinion.

Three liberal justices — Sonia Sotomayor, Elena Kagan and Ketanji Brown Jackson — said the majority opinion of five justices “shuts the door on other potential means of federal enforcement” of the Constitution’s 14th Amendment provision against insurrectionists holding office.

Conservative Justice Amy Coney Barrett, writing alone in a concurring opinion, said that the case “does not require us to address the complicated question whether federal legislation is the exclusive vehicle” through which the constitutional provision can be enforced.

Monday’s ruling is the first of at least three election-related cases the high court is deciding related directly to Trump’s 2024 political and legal fortunes as he heads to a likely rematch with Biden in the November election.

Trump is facing an unprecedented four criminal cases encompassing 91 charges. In one of them in Washington, he is accused of illegally scheming to upend his 2020 loss.

Trump argues he is immune from prosecution in the case because he says actions he took to overturn the election result were part of his presidential duties in late 2020 and early 2021 before he left office.

A three-judge federal appellate court panel unanimously ruled he is not immune from prosecution now that he is no longer in office. He appealed the ruling to the Supreme Court, which has scheduled arguments in the case for late April. In the meantime, proceedings in the case are on hold.

After Monday’s ballot ruling went in his favor, Trump implored the high court to also rule for him on the immunity question.

“Presidents have to be given total immunity,” he told reporters. “They have to be allowed to do their job. If they are not allowed to do their job, it’s not what the founders wanted, and perhaps even more importantly, it will be terrible for our country.”

The trial had originally been scheduled to start Monday and now has been delayed indefinitely.

In another case, the Supreme Court has agreed to review the validity of a law used to charge hundreds of people in connection with the January 6 riot three years ago, which also is a key element of the election indictment against Trump in Washington.

Trump is the first former U.S. president ever charged with a crime. His first trial is scheduled to start in a New York state court in three weeks, where he faces charges in another election interference case.

He is accused of trying to hide a $130,000 hush money payment to porn star Stormy Daniels just ahead of his successful 2016 campaign to keep her quiet from talking about her claim that she had a one-night tryst with Trump a decade earlier.

He has denied the affair and all 91 charges he is facing.