WASHINGTON, Dec 19 (Reuters) - Former President Donald Trump cannot appear on the ballot in Colorado in next year's presidential election because of his role in the Jan. 6, 2021, attack on the U.S. Capitol by his supporters, the state's top court ruled Tuesday in a historic judgment that will likely be taken up by the U.S. Supreme Court.

The 4-3 ruling from the Colorado Supreme Court makes Trump the first presidential candidate in U.S. history to be deemed ineligible for the White House under a rarely used provision of the U.S. Constitution that bars officials who have engaged in "insurrection or rebellion" from holding office.

The ruling applies only to Colorado's March 5 Republican primary, but its conclusion could affect Trump’s status in the state for the Nov. 5 general election. Nonpartisan U.S. election forecasters view Colorado as safely Democratic, meaning that President Joe Biden will likely carry the state regardless of Trump's fate there.

Trump vowed to appeal the ruling to the U.S. Supreme Court, and the Colorado court said it would delay the effect of its decision until at least Jan. 4, 2024, to allow for an appeal.

The ruling sets the stage for the U.S. Supreme Court, whose 6-3 conservative majority includes three Trump appointees, to consider whether Trump is eligible to serve another term as president.

The lawsuit is viewed as a test case for a wider effort to disqualify Trump from state ballots under section 3 of the 14th Amendment, which was enacted after the U.S. Civil War to keep supporters of the confederacy from serving in the government.

The Colorado court concluded that the U.S. Constitution bars Trump, the frontrunner for the Republican nomination in 2024, from appearing on the ballot because of his role instigating violence at the Capitol as lawmakers met to certify the results of the 2020 election. The court's majority acknowledged the decision was "uncharted territory."

"We do not reach these conclusions lightly," the majority justices wrote. "We are mindful of the magnitude and weight of the questions now before us. We are likewise mindful of our solemn duty to apply the law, without fear or favor, and without being swayed by public reaction to the decisions that the law mandates we reach."

Trump's campaign called the court decision "undemocratic."

"The Colorado Supreme Court issued a completely flawed decision tonight and we will swiftly file an appeal to the United States Supreme Court," a spokesperson from the Trump campaign said.

The decision reverses a ruling by a lower court judge who found Trump engaged in insurrection by inciting his supporters to violence, but, concluded that as president, Trump was not an "officer of the United States" who could be disqualified under the amendment.

The Biden campaign declined to comment.

Photo from Reuters