WASHINGTON — The Supreme Court agreed Friday to take up an issue that could change a key element of the system America uses to elect its president, with a decision likely in the spring just as the campaign heats up.

The answer to the question could be a decisive one: Are the electors who cast the actual Electoral College ballots for president and vice president required to follow the results of the popular vote in their states? Or are they free to vote as they wish?

A decision that they are free agents could give a single elector, or a small group of them, the power to decide the outcome of a presidential election if the popular vote results in an apparent Electoral College tie or is close.

"It's not hard to imagine how a single 'faithless elector,' voting differently than his or her state did, could swing a close presidential election," said Mark Murray, NBC News senior political editor.

America has never chosen its president by direct popular vote. Instead, when voters go to the polls in November, they actually vote for a slate of electors chosen by the political parties of the presidential candidates. Those electors then meet in December, after the November election, to cast their ballots, which are counted before a joint session of Congress in January.

More than half the states have laws requiring electors to obey the results of the popular vote in their states and cast their ballots accordingly. The problem of what are known as "faithless electors" has not been much of an issue in American political history, because when an elector refuses to follow the results of a state's popular vote, the state usually simply throws the ballot away.

The cases before the Supreme Court involve faithless electors during the 2016 presidential election. Instead of voting for Hillary Clinton, who won the popular vote in Colorado, Michael Baca cast his vote for John Kasich, the former Republican governor of Ohio. And in Washington state, where Clinton also won the popular vote, three of the state's 12 electors voted for Colin Powell, the former secretary of state, instead of Clinton.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Colorado threw Baca's vote out and found another elector to vote for Clinton. Washington accepted the votes of its rebel electors but fined them for violating state law. The electors challenged the fines, but the Washington state Supreme Court upheld the state law requiring them to conform to the popular vote.

The 10th Circuit Court of Appeals in Denver reached a different conclusion, however. It said electors can vote for any legitimate candidate.

Jena Griswold, Colorado's Secretary of State, praised the Supreme Court's decision to hear the case."

"Unelected and unaccountable presidential electors should not be allowed to decide the presidential election without regard to voters' choices and state law," Griswold said.

States are free to choose their electors however they want, the court said, and can even require electors to pledge their loyalty to their political parties. But once the electors are chosen and report in December to cast their votes as members of the electoral college, they are fulfilling a federal function, and a state's authority has ended.

"The states' power to appoint electors does not include the power to remove them or nullify their votes," the court said.

Because the Constitution contains no requirement for electors to follow the wishes of a political party, "the electors, once appointed, are free to vote as they choose," assuming that they cast their vote for a legally qualified candidate.

The lawyers representing Colorado and the electors from both states urged the Supreme Court to resolve the question now, instead of waiting for a crisis that could come if a renegade elector's defection threatened to affect the outcome of an election.

But the states and the electors disagreed on how the court should rule. Colorado's legal brief said that because the Constitution gives the states broad powers to decide how electors are appointed, it also authorizes the states to attach conditions to how they must vote.

"The American people choose the president while electors are mere agents who cast their Electoral College ballots according to the will of their constituents, not the reverse. The court of appeals decision upsets over two centuries of practice covering all previous presidential elections," Colorado said.

The lawyers for the electors, however, said tradition is not the same as the law.

"The structure of the Constitution, as interpreted by this Court over our 230-year history, prohibits the states from interfering with the exercise of this plainly federal function," said Lawrence Lessig, a Harvard law professor involved in both cases.

The Supreme Court ruled in 1952 that states do not violate the Constitution when they require electors to pledge that they will abide by the popular vote. But the justices have never said whether it is constitutional to enforce those pledges.

"The Electoral College is unbelievably important to the mechanics of how we select a president, but it's almost a mystery. The Supreme Court has told us virtually nothing about it, and certainly, this Supreme Court hasn't said anything," said Tom Goldstein, a Supreme Court expert who co-founded the website SCOTUSBlog and argues frequently before the court.

The court will hear the issue in the spring and decide the case by late June.