Former president Donald Trump at his Mar-a-Lago estate in Florida on April 4, 2023

An appeals court in Colorado on Tuesday ruled Donald Trump cannot appear on the state's presidential primary ballot because of his involvement in the attack on the Capitol in January 2021.

The stunning legal decision -- which Trump's campaign immediately said it would appeal -- could upend the 2024 presidential election, in which the former reality TV star is a runaway leader for the Republican Party nomination.

"A majority of the court holds that President Trump is disqualified from holding the office of President under Section Three of the Fourteenth Amendment to the United States Constitution," the Supreme Court of the State of Colorado wrote.

"Because he is disqualified, it would be a wrongful act under the Election Code for the Colorado Secretary of State to list him as a candidate on the presidential primary ballot."

The judgment comes after a group of voters challenged an earlier ruling that as a candidate for the presidency, Trump's clear involvement in the January 6 riot did not preclude his running again.

That ruling hinged on the interpretation of the 14th Amendment to the US Constitution that bars someone from holding "any office... under the United States" if they engaged in insurrection after taking an oath as "an officer of the United States" to support the Constitution.

But the amendment cannot apply to Trump, the lower court said, because the presidency is left out of the list of federal elected positions affected.

Noah Bookbinder of campaign group Citizens for Ethics, which brought the case, took to social media to hail the ruling, calling it "a huge moment for democracy."

The court placed its ruling on hold, anticipating an appeal to the US Supreme Court, which Trump's campaign immediately said it would seek.

"We will swiftly file an appeal to the United States Supreme Court and a concurrent request for a stay of this deeply undemocratic decision," campaign spokesman Steven Cheung said in a statement.

Cheung said the "all-Democrat appointed" panel was doing the bidding of a "(George) Soros-funded, left-wing group's scheme to interfere in an election on behalf of Crooked Joe Biden."

"Democrat Party leaders are in a state of paranoia over the growing, dominant lead President Trump has amassed in the polls.

"They have lost faith in the failed Biden presidency and are now doing everything they can to stop the American voters from throwing them out of office next November."

Trump's historic indictments for allegedly leading a criminal conspiracy to steal the 2020 election -- one at the federal level and another in Georgia -- have opened a frenzied legal debate over his eligibility for future office.

The Colorado action is one of multiple 14th Amendment lawsuits against Trump proceeding across the country. Minnesota's top court threw out a similar move last month.