Sen. Jeff Flake has become something decidedly rare in Washington: a senator not only willing to challenge a president of his own party, but also his own congressional leadership. “Unnerving silence in the face of an erratic executive branch is an abdication,” the Arizona Republican writes in his new book, “Conscience of a Conservative,” “and those in positions of leadership bear particular responsibility.”

Flake’s opposition to President Trump has garnered national headlines, a six-figure pledge to defeat him next year from a deep-pocketed, pro-Trump donor, and, of course, angry tweets from the president himself.

What’s gone less noticed, however, is that Flake – and a growing chorus of Republicans – have begun calling for reform of the very mechanism that helped give rise to Trump and ensured the Republican dominance of Congress and 69 of 99 state legislatures nationwide: redistricting.

In his book, Flake argues that redistricting has made Congress more partisan, more polarized and more extreme. Sophisticated map-making software and a cloud’s worth of demographic detail, consumer preferences and voting patterns have allowed “partisan warriors to carve the country up into 435 of the most ideologically extreme expressions of the American polity.”

The result? Uncompetitive districts and politicians who only play to their party’s base because they fear a primary challenge more than a loss in the general election. That makes compromise and problem solving,– all the things once considered part of the art of politics – the very things that might now cost a politician their seat. “Somewhere along the way, the two parties lost the skills or the interest to talk to each other,” he writes, “gridlock seized the gears of government, despair was followed by rage at our collapse into chaos.”

This did not happen by accident. While the gerrymander has been a lethal partisan weapon used by all sides ever since Patrick Henry tried to cheat James Madison out of a seat representing Virginia in 1788, the Republicans reinvented it in 2010 and 2011 with a plan called REDMAP, short for the aptly-named Redistricting Majority Project.

As Karl Rove explained in a March 2010 Wall Street Journal op-ed, Republicans targeted 107 state legislative seats with the goal of taking control of legislative chambers in states like Ohio, Michigan, Pennsylvania, Wisconsin and North Carolina. That election proved a decisive GOP wave – and Republicans were able to lock in those gains for the next decade by dominating the post-census redistricting

In all, Republicans had unilateral control of drawing the district lines for 193 of the 435 U.S. House seats. That’s a pretty good head start toward the 218 needed for control – especially since Democrats were only able to draw 44 districts themselves.

Those lines have endured throughout three very different elections, including the 2012 wave that re-elected Obama and gave Democratic congressional candidates 1.4 million more votes – but returned a 234-201 GOP majority. Democrats have not been able to flip a single seat on these maps in any of those five swing states, which now send a total of 49 Republicans and just 20 Democrats to Washington.

But as Flake and a growing number of Republicans now understand, this gerrymandering-on-steroids has helped produce a dysfunctional Congress that’s accountable only to the extremes. Centrists and honest brokers of all sides struggle for influence in districts rigged by such precise and nearly unbeatable algorithms.

Independent redistricting commissions are one proposed solution. As Arizona voters know, however, it’s hard to remove politics from the process. Arizona’s five-member commission, with two Democrats, two Republicans and an independent chair, has arguably pushed the politics deeper behind closed doors – and inspired both sides to game the system by nominating Trojan horse “independents” as chairs.

There is a better way to make the most of commissions. Three Democratic congressmen have introduced the Fair Representation Act (HR 3057). They aim for truly nonpartisan reform that would not only help slay the gerrymander but return bridge-builders to Congress and ensure that all of us – no matter our political views – have a chance to elect someone who would truly represent us.

Grounded in our Constitution, the act would wipe out today’s map of safe red and blue seats and replace them with larger, multimember districts (drawn by nonpartisan commissions) of three, four or five representatives. Smaller states would elect all members at large. All members would then be elected with ranked-choice voting. Nearly every district would elect representatives of both parties more and more than three in four Arizona voters would always help elect someone.

This is how you fix democracy. A ranked-choice system would eliminate our zero-sum, winner-take-all politics. Leadership of the House would belong to the side with the most votes, but would have electoral incentives to listen to all Members, not just their side. No wasted votes and no spoilers, less extremism, and, based on studies of ranked choice voting in action, less negative campaigning as politicians vied to be someone’s second choice if not their first.

Flake should consider sponsoring it in the Senate. Principled statesmen must not only raise their voice in opposition, but fight for the genuine structural reforms needed to strengthen our elections. Nothing less than the future of our democracy is at stake.

David Daley is the author of “Ratf**ked: Why Your Vote Doesn’t Count” (Norton) and a senior fellow at FairVote.