In a ruling that kicks at the foundation of how America chooses presidents, a federal appeals court Tuesday said members of the Electoral College, who cast the actual votes for president, may choose whomever they please regardless of a state’s popular vote.

The ruling by the 10th U.S. Circuit Court of Appeals in Denver said Colorado was out of bounds in 2016 when it cancelled the vote of a so-called faithless elector named Michael Baca. Baca, a Democrat, wrote in the name of John Kasich, a Republican who was Ohio’s governor at the time, even though Hillary Clinton carried Colorado, earning its nine electoral votes. The secretary of state replaced Baca with another elector who then voted for Clinton.

“The text of the Constitution makes clear that states do not have the constitutional authority to interfere with presidential electors who exercise their constitutional right to vote for the president and vice president candidates of their choice,” the court majority wrote in a split ruling by a three-judge panel.

Laurence Lessig, a Harvard law professor who founded the group that brought the case, Equal Citizens, said it was the first time a federal appeals court had ruled on whether electors could be bound in how they vote. Many states, including Colorado, have laws requiring electors to pledge that they will support the winner of the popular vote. The Constitution is mute on the subject. The appeals court noted that a handful of faithless electors had broken pledges to vote with their state’s majority since the presidential election of 1796.

Equal Citizens wants the Supreme Court to review the issue before the 2020 election. Because of hyperpartisanship and demographic changes pushing the country into near evenly divided camps, Lessig said, there is likely soon to be a presidential election that yields a tie or near tie in the Electoral College. Then, many more electors other than Baca may seek to influence the results, producing chaos.

“Whatever side you’re on, whether you think it’s a good or bad idea for electors to have freedom, the question ought to be resolved before there is a constitutional crisis,” Lessig said.

Resistance to the role of the Electoral College, which the nation’s founders set up out of fear of too much democracy, has grown stronger among Democrats since the 2000 election, when Al Gore won the popular vote but lost in the Electoral College.

President Donald Trump’s 304-227 Electoral College victory, despite losing the popular vote by nearly three million, only intensified Democrats’ antipathy.

Democratic candidates for president this year, including Sen. Elizabeth Warren of Massachusetts, have called for the elimination of the Electoral College.

“Every vote matters, and the way we can make that happen is that we can have national voting, and that means get rid of the Electoral College,” Warren said while campaigning in March.

In addition, 15 states and the District of Columbia have passed laws to award their electoral votes to the winner of the national popular vote. The agreement would go into effect once states representing a majority of 270 electoral votes join the interstate agreement. Colorado joined the group in March.

Its secretary of state, Jena Griswold, a Democrat, opposed the appeals court ruling this week. “This court decision takes power from Colorado voters and sets a dangerous precedent,” she said in a statement. “Our nation stands on the principle of one person, one vote.”