Keith Gaddie has "hung up his spurs."

The election expert from the University of Oklahoma no longer helps state legislatures draw new district lines to maximize their partisan advantage.

He was still wearing those spurs in 2011 when he provided data that helped Wisconsin Republicans enact a legislative redistricting plan aimed at maximizing their power for the foreseeable future.

But now he has reversed course and filed a brief in the U.S. Supreme Court arguing that the practice is undemocratic.

The high court hears arguments Tuesday testing whether extreme partisan gerrymandering is unconstitutional. The case from Wisconsin has the potential to radically reorder politics in America.

In the short run, if the court sides with Gaddie, Republicans would be the losers. In the last two decades, the GOP has greatly increased and entrenched its dominance in the state legislatures and Congress through the use of partisan redistricting. The GOP now has control of state legislatures in 32 states, covering 61 percent of the population, while Democrats control just 13 state legislatures, covering 28 percent of the population.

What is "gerrymandering"?

Partisan gerrymandering is a practice that goes back to the early years of the republic. It got its name in 1812 when Massachusetts Gov. Elbridge Gerry signed into law a legislative map drawn to benefit his own party; it included a district so misshapen that it looked like a salamander, and the term gerrymander was born.

Since then, politicians from both parties have practiced, denounced and embraced it as a way to leverage their power. In 2004, the Supreme Court, by a 5-4 vote, refused to outlaw the practice. But the fifth and decisive vote was cast by Justice Anthony Kennedy, who left the door open to revisiting the issue if a manageable test could be found for evaluating how much is too much partisanship.

What this case is about

Now the issue is back in the case from Wisconsin, where Republicans in 2011 controlled both the legislature and the governorship in a redistricting year for the first time in decades, presenting them with a unique opportunity for consolidating their power.

Working in secret, they drew new district lines that would, for the remainder of the decade, solidify their control. A week after the plan was unveiled, the GOP majority enacted it into law.

The plan was amazingly on target. In the next election in 2012, Republicans, carried only a minority of the state vote — 48.6 percent — but, as the GOP map designers had privately predicted, Republicans still won close to two-thirds of the state assembly seats, a 60-39 seat majority.

The tools the map designers used were not new — packing large concentrations of Democratic voters into a district to give the opposition party far more voters than they needed to win. They then spread out the remaining Democrats into districts where they would be clearly outnumbered (a practice known as cracking).

The marriage of high tech and new data analysis

A divided federal court found that while these techniques were not new, something else was — specifically, high-speed computer technology able to spit out thousands of alternative maps that meet the test of having equal numbers of residents and instantly matching each prospective map with new kinds of voter data to project outcomes well in advance of any election — all with breathtaking accuracy.

Gaddie emphasizes that he didn't draw any maps himself. What he did was create ways to run thousands of computer simulations, analyze the data and give it to those who actually were drawing the maps.

"They don't ask, 'Is this fair?' " Gaddie observes. "They just ask, 'What does this do?' "

Lawyers for the state say there are reasons for the Wisconsin district disparities that are not partisan.

"It is a political fact that Democratic voters tend to be relatively concentrated in urban areas and the Republicans are relatively dispersed in rural areas," said lawyer Paul Clement, who represents the GOP legislative leadership, none of whom wanted to be interviewed for this article.

Wisconsin Solicitor General Misha Tseytlin will defend the plan in the Supreme Court. She will tell the justices there is nothing salamander-like in his state's redistricting.

"It is undisputed," he contends, "that Wisconsin's map here complies with all traditional district criteria."

But the University of Michigan's Jowei Chen, an expert on geography and gerrymandering, has a different take. After running some 200 potential redistricting maps, he concluded that the state's demographic geography accounts for only one to three more seats for Republicans, whereas aggressively partisan gerrymandering yielded a 10 to 15 seat GOP advantage in the state legislature.

Moreover, Chen said, the heightened partisan advantage split more counties and municipalities than any of the sample, less partisan maps.

Is extreme partisan gerrymandering unconstitutional? Can the courts really tell when a plan is extreme?

The legal question before the Supreme Court is whether such partisanship in gerrymandering is so extreme that it is unconstitutional. Does it deny citizens the equal protection of the law; does it deny them their First Amendment right of free speech and association by making their votes less valuable? And ultimately is that something a court can accurately measure?

Lawyer Paul Smith, vice president of litigation and strategy at the nonpartisan Campaign Legal Center, represents those challenging the GOP redistricting plan. He will tell the justices the time has come for the court to act.

"There are now tests that were employed here to allow the courts to figure out what are the really bad gerrymanders," he said, adding that Wisconsin's is among the four worst partisan-drawn districts in the country.

The tests vary from a mathematical formula for measuring when districts are drawn to over-concentrate the voters of one party but not the other. There is also a broader and more conventional test for evaluating the degree of partisan redistricting, which was used by the lower federal court that first ruled in this case: 1. Was there discriminatory intent in drawing the districts? 2. Does the plan have a durable effect — will it entrench the same majority for the decade? And 3. Is there a neutral explanation for the way the lines are drawn, like the state's geography?

"When you have those three conditions, there ought to be a remedy," Smith said, "because what you have then is a sham of a democracy."

Election experts, including Gaddie, have filed briefs saying the technology now exists to answer these questions. But there are others who are not so sure. Among them is Princeton University's Nolan McCarty, who did not file a brief.

"I'm not saying that the Supreme Court shouldn't establish a principle against partisan gerrymandering, but I think it's going to be very hard to adjudicate in specific cases," he said. "Whether we can tell with any statistical precision whether or not a particular plan deviates from fairness in an illegal way is something that I'm a bit skeptical about."

Even some Republicans say the Supreme Court should act

Still, looking at the 53 amici curiae briefs filed in the case, 32 of them against partisan redistricting, it is striking how many Republicans, including current and former U.S. senators, governors and state legislators, are urging the Supreme Court to act now to at least limit extreme partisan gerrymanders. They say these asymmetrical systems have grown so exponentially that they pose a threat to democracy.

Among those are two former GOP presidential candidates, Sen. John McCain of Arizona and former Sen. Bob Dole, former Oklahoma Gov. Frank Keating, former California Gov. Arnold Schwarzenegger and the former Assistant Republican leader of the U.S. Senate Alan Simpson of Wyoming.

Never one to mince words, Simpson says of partisan gerrymandering, "It poisons the system. ... It stinks!"

(Of course, he hasn't been in Congress for 20 years.)

Less colorful, but equally firm is Republican Dale Schultz, who, for 32 years, served in the Wisconsin Legislature, rising briefly to the position of GOP leader. Schultz voted for the redistricting plan that is now before the Supreme Court, but he had second thoughts when he realized the enormous advantage it created for his party.

"The first big tipoff was after the [2012] election," he said, "when the Democrats had won a substantial victory in Wisconsin by, I think, 125,000 votes ... and lost a considerable number of seats in the legislature."

New tools to analyze voter behavior, "brought to bear with current technology amplifies what you can do in redistricting like we've never seen before," he added. "We've allowed technology and gerrymandering to sort of rob the people of their vote. ... Legislators are picking their constituents rather than constituents picking their legislators."

Watch what you wish for

Wisconsin Solicitor General Tseytlin, however, has a cautionary observation: "Not everything that one thinks is a bad idea is unconstitutional. We have a system where the courts have a certain bandwidth in which they can operate, and if there are no neutral principles that can be announced, it's better for the courts to stay their hand."

Supreme Court advocate Kannon Shanmugam agrees, voicing a further concern about the "inevitable politicization of the judiciary that's going to result" from "embroiling the courts in these quintessentially political disputes."

Some critics of court involvement point to an alternative solution adopted in some states: the creation of independent redistricting commissions to draw maps. At least seven states have adopted such commissions.

Most, however, were created by voter initiatives, over the objection of the state legislatures themselves, and only 11 states even allow such an initiative process according to the Campaign Legal Center.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.