A federal judge denied a request from two Colorado electors challenging the requirement they vote for the state winner of the presidential election.

The two Democratic electors want to be freed of the requirement that they vote for Hillary Clinton so they can cut a deal with Republicans from other states to make someone other than Donald Trump president.

"It would undermine the electoral process," to allow electors to vote against winner of popular vote in Colorado, the judge said.

They were part of a longshot attempt to keep Trump out of the White House when the electoral college meets Dec. 19.

Clinton won Colorado on Nov. 8 while losing the presidential election. Trump garnered 306 electoral votes to her 232. But a small group of electors from Colorado and Washington state hoped to unite Democrats and Republicans behind a consensus Republican pick other than Trump.

The Associated Press contributed to this report