The Supreme Court convened Wednesday to consider whether states have the right to control how their presidential electors vote, and the hearings quickly became a law professor’s dream of hypotheticals and constitutional flyspecking.

Could a state inform its citizenry that their votes for president would be “advisory” but not binding when the electoral college meets?

Is a state powerless to replace an elector whose change of heart is the result of bribery or blackmail?

What of the elector who decides after the election “I really like Frodo Baggins,” asked Justice Clarence Thomas, referencing one of the principal protagonists in J.R.R. Tolkien’s “Lord of the Rings.” That person is free to vote his or her conscience, a lawyer challenging state restrictions said, but not for a hobbit; the candidate must be a real person.

After more than two hours of argument in the court’s final scheduled teleconference hearing — and with the November election looming — it seemed the outcome might be influenced by what Justice Brett M. Kavanaugh called the “avoid-chaos principle of judging.”

That “suggests that if it’s a close call or a tiebreaker, that we shouldn’t facilitate or create chaos,” Kavanaugh said.

The word was used often as the court considered cases from the state of Washington and Colorado. Washington moved to fine Peter Bret Chiafalo and two others $1,000 after they voted for Colin Powell when the electoral college convened after the 2016 election. They had pledged to vote for Hillary Clinton, who won the state’s popular vote.

Colorado replaced Micheal Baca when he said he intended to vote for Republican John Kasich instead of Clinton, who won his state. Baca was part of a movement to try to deny Donald Trump the presidency.

The Washington Supreme Court ruled for the state, saying the Constitution’s directive that gives states the power to select members of the electoral college also means they can set the standards those electors must follow, such as living up to their pledge to support the state’s popular winner.

A panel of the U.S. Court of Appeals for the 10th Circuit went the other way. It said Colorado’s control ended with deciding how electors from the state are chosen. From there, the Constitution envisions the 538 electors are free to vote their minds in deciding who should be president and vice president.

All but two states have winner-take-all systems, and 32, plus the District of Columbia, require those running to be electors to pledge to support the state’s winner. The states vary as to penalties, if any, for breaking their word or whether electors with a change of heart may be replaced.

States had asked the court to settle the matter, in case the November election was close enough that a small number of what are sometimes called “faithless electors” could determine the outcome. The 2000 election, for instance, was decided by five electoral votes.

That clearly was on the mind of Justice Samuel A. Alito Jr. He said the court must “interpret the Constitution to mean what it means, regardless of the consequences,” but then worried a lot about the consequences.

Experts, he said, warn that if an election is close “there would be concerted campaigns to change that result by influencing a few electors.”

And Washington Solicitor General Noah Purcell and Colorado Attorney General Philip J. Weiser warned that challengers would impose a system unlike any the country has known, where voters expect electors to follow their direction.

“To adopt their view would be to radically change, to radically change, how American presidential elections have always operated,” Purcell said.

The lawyers representing Chiafalo and Baca — Harvard law professor Lawrence Lessig and Los Angeles attorney Jason Harrow — are critics of the system and the winner-take-all process most states use. (Each state’s share is the same as its congressional delegation.)

Lessig said Washington would reject the Constitution’s design of a college of electors that selects the president and instead give “states the power to cast votes for president in such manner as the legislature thereof may direct.”

But the Constitution “does not give the states the power to cast votes. It gives the states the power to appoint electors. And the actual electors that the Constitution creates have a legal discretion, as every elector does.”

Lessig told the justices that states may require those who want to be electors to pledge to support the state’s winner. But it cannot do more.

Electors may have a “moral obligation” to cast their votes that way, Lessig said. But states go too far by removing them or punishing them if they change their minds.

Justice Ruth Bader Ginsburg found it “hard to understand” the concept that “I have made a promise to do something, but that promise is unenforceable.”

Lessig said it happens all the time in the political world, where members of Congress take a pledge not to raise taxes, but then vote to do so.

Under questioning from Alito, Lessig acknowledged that even an allegation of bribery would not be enough for a state to remove an elector who had been duly selected.

But Alito also tested the limits of the states’ arguments. He wondered if Washington could say that it was picking “12 wise people” to cast the state’s electoral votes, and that the choice of voters would be only advisory.

Purcell said that was a “a tough question, but I think they probably could do that.”

Weiser said states served as “stewards of the election.”

For all the questions the case raised, the instances of “faithless electors” are regular, but small. The voting advocacy group FairVote found that while Congress has accepted the votes of electors who went rogue, that amounted to a little more than 150 votes.

“In fact, in the history of electors, there has been one elector out of the 23,507 votes cast who have switched parties against the majority party in a way that it could have mattered,” Lessig said. “That was the very first time this happened, Samuel Miles in 1796.”

Ginsburg told Weiser that “faithless voting throughout the years has always been rare,” and asked “how much difference does it make” if the court sides with challengers.

Weiser described a “constitutional crisis.”

“If states have no ability to remove bribed electors and all that’s left is Congress’s ability to choose to count or not count, the mere fact of bribing electors in an open enough way would knock out electors, would limit who could vote, and ultimately could sway the outcome of a presidential election,” he said.

The cases are Chiafalo v. Washington and Colorado Department of State v. Baca.

Justice Sonia Sotomayor participated in the Washington case, but recused herself from the Baca case because she is friends with one of the three electors who originally brought the suit.