WASHINGTON (CN) – Considering the issue for the second time in as many years, the Supreme Court struggled Tuesday to pin down when, whether and how to tackle gerrymandering driven by political, rather than racial, bias.

Presented with one case from North Carolina Democrats and another from Maryland Republicans, the justices appeared divided across two hours of sometimes contentious arguments this morning. With no standard on the books as yet, the justices asked difficult questions of both sides.

They also returned repeatedly to the views expressed on the issue last year by former Justice Anthony Kennedy before his retirement.

“It seems to me that this is kind of Justice Kennedy’s hypothetical come to life,” Justice Elena Kagan said, “in the sense that there is a particular provision in the [North Carolina legislation here that says the partisan makeup of the congressional delegation is 10 Republicans and three Democrats and the committee shall make reasonable efforts to construct districts to maintain that current partisan makeup, 10 and 3.”

Kennedy’s successor, Justice Brett Kavanaugh, was an active questioner throughout the arguments Tuesday morning and routinely pressed the attorneys to give him a baseline against which courts should judge when a state has gone too far in considering politics in their map-drawing efforts.

In 2016, North Carolina Republicans set out to redraw their state map after a federal court struck it down as an unconstitutional racial gerrymander. Intent on avoiding another racial challenge, they brought in a mapmaking expert and, among other things, instructed him to preserve the party’s 10-3 advantage in the state’s congressional delegation.

The League of Women Voters, Common Cause, the North Carolina State Democratic Party and a collection of voters filed two lawsuits challenging the map as a partisan gerrymander. They say the mapmaker packed Democrats into a small number of districts while diluting other liberal strongholds by jamming them into GOP-controlled areas to offset their impact.

A panel of judges struck down the map, but the Supreme Court sent the case back last year after ruling on a gerrymandering case out of Wisconsin. The lower court again invalidated the map in November.

Paul Clement, who argued in favor of the map on Tuesday, said the founders unequivocally chose to put redistricting in the hands of political actors and that the court stepping into the issue would be inappropriate.

Clement, with the firm Kirkland & Ellis, said people who complain their districts favor their political opponents are simply trying to impose proportional representation on a system that was never meant to operate that way.

He also said the court’s inability over the years to develop a standard by which to judge partisan gerrymandering claims is no accident. If it chooses to weigh in on the issue, it will soon be overwhelmed by voters challenging maps they don’t like, he added.

“And once you get into the political thicket, you will not get out and you will tarnish the image of this court for the other cases where it needs that reputation for independence so people can understand the fundamental difference between judging and all other politics,” Clement said.

The more liberal justices on the court were especially skeptical of Clement’s argument, saying the intent of the North Carolina Legislature was so clear that it must open a space for the court to weigh in.

“The way this is structured, there is absolutely no opportunity to – not none but virtually none, I’m exaggerating slightly – but virtually none for maybe a majority party to elect more than or less than a third of the people they voted for,” Justice Sonia Sotomayor said.

Responding to Clement’s argument that the court would be overwhelmed by gerrymandering cases if it weighed in on the issue, Justice Stephen Breyer floated a test that would invalidate maps if a party gets a majority of the votes, but its opponent receives two-thirds or less of the seats.

Attorneys who argued for the North Carolina voters on Tuesday called the state’s redistricting particularly extreme, saying it was expressly designed to entrench Republican power in a state that is roughly evenly divided along party lines.

Allison Riggs, an attorney with the Southern Coalition for Social Justice, told the justices to adopt a three-part test set forward by the District Court. The test would look at whether there was partisan intent in a map-drawing effort, whether the map had the effect of carrying out that intent in a “severe and durable” way, and whether there is any other neutral justification for the result.

Riggs said the test would allow the court to invalidate the most egregious of maps while keeping it out of less clear fights.

“Our proposed test, the one adopted by the district court, is so exacting, that it narrows dramatically the number of plans subject to scrutiny and leaves legislatures lots of breathing room” Riggs said.

Some of the more conservative justices were highly skeptical. Justice Samuel Alito wondered why the proposal wouldn’t mandate states move to “proportional representation light,” while Justice Neil Gorsuch pressed Riggs on how the court should evaluate a plan’s effect.

“So aren’t we just back in the business of deciding what degree of tolerance we’re willing to put up with from proportional representation,” Gorsuch said.

The Maryland case is more narrow than the one out of North Carolina, as it challenges only the state’s 6th Congressional District. Republicans who live in the district say the state’s Democrats shaped the district to draw in more Democrats and do away with the reliably conservative seat.

The voters say the redistricting violated their First Amendment rights, but a federal court denied their request for an injunction. The case went to the Supreme Court last year for arguments, but the justices sent it back on procedural grounds.

On remand, the District Court found in favor of the voters.

Maryland Solicitor General Steven Sullivan said, while the court should find a way into partisan gerrymandering claims, his case is not the avenue it should use to get there. He said the First Amendment test the voters proposed would not help the court distinguish cases that are excessive from those that are not and that it is impossible to take all partisan intent out of redistricting.

He also said the Maryland lawmakers had legitimate reasons for redrawing the map as they did, including doing away with a district that spanned the Chesapeake Bay.

Michael Kimberly, an attorney with Mayer Brown who argued for the Maryland voters, said judging the cases against the First Amendment test the lower court adopted would make it easier to see when a redistricting effort is based too much on political interest.