This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

DENVER —  A state court judge ruled Tuesday that all Colorado electors to the Electoral College must vote for Hillary Clinton or vacate their positions.

Initially, judge Elizabeth Starrs said if the electors take the oath and don’t vote for Clinton, they would face criminal penalties.

But she later said the electors would be replaced if they don’t vote for Clinton and it would then be up to prosecutors to decided whether they would face charges.

The decision ensures Clinton will receive all of Colorado’s nine electoral votes.

Starrs ruled after the Secretary of State’s Office sought a way to prevent electors from not voting for the winner of the state’s popular vote, which is required by law.

Two Democratic members of Colorado’s Electoral College fought to have a state law ruled unconstitutional so they could vote for someone other than Clinton in an attempt to keep Donald Trump from becoming president.

On Monday, a U.S. District Court judge shot down a lawsuit filed by Polly Baca and Robert Nemanich, who were seeking a restraining order that would have blocked the state law that requires them to vote for Clinton, who won the state’s popular vote.

On Tuesday, they appealed to the 10th U.S. Circuit Court of Appeals. However, the Secretary of State’s Office said the court does not have to hear the appeal before the official vote on Monday.

RELATED: Faithless electors appeal

Jesse Witt, an attorney for Baca and Nemanich, said he might appeal Starrs’ ruling.

Trump lost the national popular vote by about 2.6 million votes but won enough states to give him 306 Electoral College votes. He only needed 270 votes to win.

Baca and Nemanich wanted the law ruled unconstitutional so it could affect other states with similar laws. That way, electors in states that Trump won could be freed to vote for someone other than the president-elect.

If it happened, they would have needed to persuade all 232 Democratic electors and 38 Republican electors to vote for someone else.

There are 29 states that require members of the Electoral College to vote for whoever won the popular vote in their state. So-called faithless electors might be subject to fines or could be disqualified for casting an invalid vote and be replaced by a substitute elector.

In Monday’s ruling, U.S. District Court Judge Wiley Daniel struck down the lawsuit and called it a “political stunt.”

Members of the Electoral College will meet in their respective state capitals on Monday to cast their official votes.

Colorado electors could face up to one year in jail and a $1,000 fine if they defy the law and vote for someone other than Clinton.