If President James Madison were invited back now to the American republic he helped shape, he could be forgiven for politely declining. He believed American democracy had to govern from the center — absorbing change incrementally — to glue his sprawling country together. But a center is hard to find as the polarizing primaries of 2018 wind down this month. Ranked choice, a method of voting that Maine tried in June, might help.

Suppose for a moment that invisible laws, as inescapable as the gravity that controls planets, applied to politics. Winner-take-all voting seems physics-like in its predictability today, consistently pushing voters outward and away from the political center. It might be a tad early to claim for ranked choice the exalted status of a law of physics. It has been used exactly once on a statewide basis. But its logic also has a certain physics-like inevitability — in the opposite direction, pulling voters toward the center.

Winner-take-all elections award victory to candidates scoring the most votes, sometimes far less than a majority. They benefit organized voter blocs, such as the partisan bases, usually a small fraction of the electorate, and disfavor the larger group of loosely affiliated party members and independents. Whether right- or left-leaning, this larger group is less absolutist than party bases and correspondingly more sympathetic to less absolutist candidates.

Yet their votes often depart from their choices, lest a vote for their favorite choice hand victory to their worst choice. Fear-based subversion of voting, called the “spoiler effect,” is fed by polarizing voters. It's a go-to strategy for close elections.

Ranked choice voting replaces the fear-based logic of winner-take-all with a kind of guilt-free-diet style of voting: lots of choices, no spoiler risk. In “RCV,” as it’s called here in Maine, voters rank candidates by order of preference from first to last, ballots are counted, the candidate in last place is eliminated, his or her votes are reassigned to the voters’ next choices, and the process starts again until a candidate wins a majority. In short, this system unites voters’ choices with their votes.

Maine implemented RCV for all races in its June 12 primary while asking voters whether they wished to continue it in the future. Despite splenetic opposition from Maine’s Republican governor, it turns out voters did, and they used RCV to cast ballots that very day.

Turnout was heavy on both sides; in fact Democratic officials believe that it was the largest primary turnout in their party’s history. The gubernatorial race, won by Attorney General Janet Mills, drew seven candidates. The large field and record turnout probably reflected removal of the spoiler risk: More candidates entered, more voters voted.

Almost all Democratic voters bought into the new system: Those selecting a lesser known favorite as first choice stayed long enough to score the others on the ballot, too. Mills, the closest to the political center, got only 33% of the vote in the first round — yet after four more rounds, she had built a majority. She proved to be the most acceptable even among voters who had chosen someone else first (or second or third), showing RCV’s unifying potential.

On substance, too, ranked choice was a magnet to the center, inducing Democratic candidates to adopt each other’s popular issues. And in a campaign season notable for ugly rhetoric, there was little negativity, at least on the Democratic side; candidates appealed to their rivals’ supporters rather than attacking each other.

Ranked choice cannot be used for state-level general elections in Maine without a constitutional amendment. Even so, it is already clear that it offers an exit ramp from problems in all-or-nothing voting, starting with the useful discovery that voters might be less polarized than candidates.

For example, Georgia’s gubernatorial election has become a slugfest between Trump Republicans and progressive Democrats, making some Georgians feel like orphans. “The Republicans are losing the middle … the Democrats are losing the middle, and the middle is kind of shrugging like, ‘O.K., what am I supposed to be doing?’” lamented Lynn Westmoreland, a former Republican congressman.

If RCV had operated in Georgia’s primaries, more centrist candidates might have prospered. The same dynamic played out in Florida’s gubernatorial primary last week when the winners were Republican Rep. Ron DeSantis and Tallahassee Mayor Andrew Gillum, the furthest right and left of their fields.

The Kansas Republican gubernatorial primary initially ended in a 200-vote cliffhangerbetween Secretary of State Kris Kobach and incumbent Gov. Jeff Colyer. Although Colyer eventually conceded, because the vote was winner-take-all, the more than 52,000 voters who had chosen neither candidate had no voice. Under RCV, their votes could have counted and probably given Kansas a clear winner.

Ranked choice, like polarization, is self-reinforcing. Polarization causes dysfunction, which causes frustration and anger, causing more polarization. Ranked choice creates, well, more choices, which creates more diverse voters, creating more need for compromise, and more space for government to govern. James Madison would approve.

Peter Fromuth, a former senior State Department official in the Clinton and George W. Bush administrations, is an attorney from Yarmouth, Maine.