The Supreme Court will decide whether Electoral College voters have a constitutional right to cast ballots for candidates who didn't win their state's popular vote, the justices announced in an order on Friday.

The justices said they will hear two cases brought by Electoral College voters in Washington state and Colorado who refused to vote for Hillary Clinton in 2016 despite her wins in those states.

Like most states, Washington and Colorado require their electors to follow the will of their states' voters. But those laws are now being challenged by Electoral College voters who argue that such laws are unconstitutional.

A decision in the matter is expected by the end of June, ahead of the U.S. presidential election in November. The cases are the latest in a string of high-profile disputes the top court is expected to resolve in a contentious election year.

Historically, the faithfulness of Electoral College voters has largely been a formality. In 2016, 10 out of the total 538 electors attempted to cast ballots out of line with their state's popular vote. But attorneys on both sides of the issue urged the top court to resolve the constitutional question before a crisis emerges.

Larry Lessig, an attorney for the electors in Washington, wrote in court papers that a swing by 10 electors would have been enough to alter the results in five of 58 previous presidential races.