The Supreme Court has never struck down a state redistricting plan because of extreme partisan gerrymandering, and the justices’ deliberations Wednesday during their second look at the issue this term only underscored why.

At least one justice thinks the courts have no business second-guessing the political decisions of elected representatives. Others worry about being drawn into every redistricting dispute between Democrats and Republicans. And even the justices who see gerrymandering as an evil are torn about the constitutional test that should be applied.

After considering during the first week of their term a Republican-drawn plan from Wisconsin that hurt Democrats and, now, a Democratic-drawn plan in Maryland that undermined a Republican congressman, there was a sense the conversation was moving in circles.

Justice Elena Kagan suggested that if the court couldn’t find a constitutional problem in the Maryland redistricting, it may never reach agreement on the issue.

“However much you think is too much, this case is too much,” Kagan said, drawing laughter from the courtroom as she addressed Maryland Solicitor General Steven M. Sullivan.

She continued: “People were very upfront about what they were trying to do here, which was to create another Democratic district.”

But the same was true in the Wisconsin case — albeit in mirror image — as the Republican-controlled legislature and Republican governor saw a once-in-a-generation chance to draw lines advantageous to their party.

The court has not issued a decision in that case, and there were indications from Wednesday’s hearings that either the court has not decided how to rule or that challengers were in danger of losing.

Justice Stephen G. Breyer, who has favored a role for courts in deciding when political bias violates the Constitution, suggested combining the Wisconsin and Maryland cases with a pending North Carolina case for a future hearing. It is unlikely he would propose such a course if his side was confident about how the Wisconsin ruling would come down.

Some justices suggested that in the Maryland case, it was unlikely that even a victory for the challengers would result in changes before the fall elections. It might be better, they said, to return the case to the lower court for more work.

Breyer said it was important for the court to act — if it were going to — before the 2020 Census, when a new round of redistricting would begin. Technological innovations have made it easier for one-party-rule states to draw districts that will entrench them in power, he said.

“If you think what’s happened now is something, wait until you see those computers really working,” Breyer said.

The key justice is likely to be Anthony M. Kennedy. He has said that, while a test seems elusive, extreme partisan gerrymandering might be seen constitutionally as retaliation for a voter’s past votes, a violation of the First Amendment.

That is the claim a handful of Republican voters brought. They singled out Maryland’s 6th Congressional District, which in the past stretched from the state’s western border across the top of the state. Republican Roscoe Bartlett had represented the area since 1993 and won reelection in 2010 by a 28-point margin.

Growth reflected in the census that year indicated the district needed to add about 10,000 people. But to accomplish that, the state’s Democratic leaders pushed the district boundaries into Democrat-heavy Montgomery County. That required moving hundreds of thousands of voters from one district to another and made the district much more likely to elect a Democrat, which it did in 2012 and has done since.

Sullivan said the actions simply made the district “competitive.”

Chief Justice John G. Roberts Jr., who has been resistant to the court’s involvement in such cases, said there didn’t seem to be much “internal logic” to the change, except perhaps to connect the “hobby farms” of Potomac to the “real farms” of Western Maryland.

Justice Sonia Sotomayor noted “pretty damning evidence” in the case, including a deposition from Democratic former governor Martin O’Malley. You have your own governor, she told Sullivan, “saying that he felt duty-bound to ensure that his party won.”

Washington lawyer Michael B. Kimberly, representing the Republican challengers, said that under the court’s First Amendment precedents, “government officials may not single out particular individuals for disfavored treatment on the basis of the views that they have expressed at the ballot box in prior elections.”

But, echoing the state’s arguments, justices across the board wondered whether such a broad approach would require courts to forbid any political considerations, such as protecting incumbents.

“I really don’t see how any legislature will ever be able to redistrict,” said Justice Samuel A. Alito Jr., adding, “hasn’t this court said time and again you can’t take all consideration of partisan advantage out of districting?”

Even Kagan and Sotomayor had trouble defining how courts would ascertain the minor political considerations Kimberly said his First Amendment theory would allow.

Kennedy returned to the central issue of whether a state legislature could put a thumb on the scale in favor of the party in power. He asked Sullivan a question similar to what he asked Wisconsin’s lawyer last fall:

Suppose a state constitution “had a provision that required that partisan advantage for one party be the predominant consideration in any districting. Lawful or not?”

No, that wouldn’t be lawful, Sullivan said, but Maryland doesn’t have that.

Roberts and Kagan said Maryland’s redistricting statute gives just such an advantage to Democrats.

Not on its face, Sullivan said.

Kennedy responded: “So, if you hide the evidence of what you’re doing, then you’re going to prevail?”

The Maryland case is Benisek v. Lamone. The Wisconsin case is Gill v. Whitford.