Maine's gubernatorial race will pit a Democrat who wasn't voters' first choice but won through a ranked-choice algorithm against a conservative Republican who led his primary from the start — and the days-long process that produced her nomination raises fresh questions about whether the system delivers results ordinary citizens can trust.

The stakes are straightforward: a state built on independence and self-reliance will choose between a candidate shaped by the statehouse apparatus and a Republican running against it. How that candidate got the nomination matters just as much.

Hannah Pingree, a former Maine House speaker who later worked on policy initiatives for Gov. Janet Mills and won her endorsement, secured the Democratic nomination early Friday after a ranked-choice runoff that stretched on for days, according to the New York Times. The process required law enforcement to transport ballots from across the state to Augusta, upload them into a computer system, verify tallies, and then — in the early hours — have a state official push a button so a computer could perform successive rounds of eliminations until one candidate cleared 50 percent.

That candidate was Pingree. She was not the initial frontrunner. Dr. Nirav Shah, who led the state's Covid response, held first place after the initial count with 27 percent. Pingree sat at 23 percent. Troy Jackson, a logger and former State Senate president, and Secretary of State Shenna Bellows each had 21 percent. Angus King III was eliminated after the first round. Then the algorithm went to work, redistributing votes until Pingree crossed the threshold.

On the Republican side, Bobby Charles — a conservative and former State Department official — had led his primary with 38 percent and was the heavy favorite heading into the runoff, the Times reported. He won the nomination.

The Atlanta Journal-Constitution also confirmed both nominees and noted another ranked-choice result: Democrat Matt Dunlap will face former Republican Gov. Paul LePage in the 2nd Congressional District, a seat Democrats are fighting to hold as the battle for the U.S. House intensifies.

The Pingree nomination is the story inside the story. Maine's ranked-choice system has now repeatedly produced winners who weren't the first choice of the most voters on initial ballots. Whether that's a feature or a bug depends on who you ask — but the process of transporting ballots across the state, feeding them into a computer, and waiting for an algorithm to spit out a winner doesn't look like the kind of self-government the founders had in mind. The establishment press frames this as normal democratic process. It's worth asking whether a system that takes days and a computer to find a winner that voters didn't put in first place is serving Mainers — or serving the political class that keeps benefiting from it.

November will answer the bigger question: whether a candidate forged in the statehouse, endorsed by the sitting governor, and elevated by an algorithm can withstand a challenge from outside that apparatus.