Maryland residents Stephen Shapiro, right, and John Benisek stand in front of the Supreme Court in Washington on Nov. 4, 2015, after the high court heard arguments their case involving congressional redistricting. (Jessica Gresko/AP)

The Supreme Court seemed conflicted Wednesday about whether a Maryland man may proceed with his complaint that the redistricting process in the state is unconstitutionally partisan.

Some justices were concerned that a single federal district judge had decided on his own to curtail Steve Shapiro’s lawsuit over Maryland’s much-criticized gerrymandered congressional map rather than send it to a special three-judge panel to see whether the complaint had merit.

Justice Stephen G. Breyer said Shapiro and his co-plaintiffs “want to raise about as important a question as you can imagine. . . . And if they are right, that would affect congressional districts and legislative districts throughout the nation.”

But other justices seemed concerned about further involving the court in the political machinations of redistricting, where the party in control of a legislature routinely draws congressional and legislative districts to its own advantage.

“This court has never seen [a political gerrymandering challenge] that it thought was justiciable,” said Justice Samuel A. Alito Jr., referring to a controversy over which the courts, rather than the political branches, can grant a remedy.

Shapiro, a longtime foe of partisan gerrymandering who has quit his job as a federal worker to enroll in law school, wants to give the Supreme Court another chance to make that call.

In a 2004 decision in Vieth v. Jubelirer, a plurality of the court concluded that after many years of trying, courts had not been able to come up with a test to decide when partisan gerrymandering — as opposed to racial gerrymandering — went too far.

Justice Anthony M. Kennedy agreed with those justices in that case, but he did not think that barred “all future claims of injury from a partisan gerrymander.”

Kennedy said he could envision a future First Amendment challenge “where a state enacts a law that has the purpose and effect of subjecting a group of voters or their party to disfavored treatment by reason of their views.”

Shapiro’s attorney, Michael B. Kimberly, told the court: “It’s Justice Kennedy’s concurrence in Vieth that provides the basis for the complaint in this case.”

Although registered Democrats in Maryland outnumber Republicans 2 to 1, the state’s Democratic leadership drew its eight congressional districts to make seven of them safe for Democrats. A judge in a case separate from Shapiro’s compared one of the state’s congressional districts — which expands and contracts to include residents of Silver Spring, Columbia, Annapolis, the city of Baltimore and Baltimore County — to a “broken-winged pterodactyl, lying prostrate across the center of the state.”

In most cases, challenges to redistricting arrive before a federal district judge only long enough to be referred to a special three-judge panel, as outlined in federal law.

But U.S. District Judge James K. Bredar dismissed Shapiro’s First Amendment complaint on his own. He said Shapiro’s remedy was persuading the Maryland General Assembly and Congress, not the courts, to change the process.

The question before the Supreme Court is whether that decision was correct or whether a judge is required to pass along such a lawsuit to the three-judge panel.

Kimberly told the court that Congress wanted such constitutional challenges to be settled quickly, with a decision by the three judges and then immediate review by the Supreme Court. Shapiro’s case showed the wisdom of that system, he said.

Shapiro already has been before a district judge, an appeals court and now the Supreme Court. If he is successful with the justices, the process in effect would start over: He would argue the merits of his claim to a three-judge panel, and the resulting decision would go back to the Supreme Court.

Justice Antonin Scalia seemed taken aback by the cumbersome process. “Wow, that’s — I mean, that’s my comment,” Scalia said.

But Maryland Assistant Attorney General Steven M. Sullivan — and some justices — said that was a reason that district judges should have the power to dismiss such complaints. There were seven challenges to Maryland’s redistricting that were dismissed, he said, rather than further clogging already crowded court calendars.

Sullivan said a “legally insufficient complaint that otherwise could not get past the threshold of the courthouse is going to get a direct appeal to this court.”

Chief Justice John G. Roberts Jr. was concerned as well. The law’s requirement that the Supreme Court review a decision of a three-judge panel is a departure from the normal process, where the justices decide whether the cases present a legal issue that requires their involvement.

“That’s a serious problem because there are a lot of cases that come up in three-judge district courts that would be the kind of case — I speak for myself, anyway — that we might” decline to take, Roberts said.

Even Breyer said he had concerns about that. And Roberts and Alito questioned Kimberly’s assertion that a three-judge panel was the best way to assure the public that politics had been removed from a court’s decision about a redistricting plan.

The process of appointing the panel might be open to judicial politics, Alito said.

“So I don’t see how that creates an insulation against the appearance of political favoritism,” he said.

Kimberly replied that any process is open to criticism. But Congress’s view, he said, is that “the public could rest more easy when decisions of such political importance and sensitivity are decided by three judges rather than one.”

The case is Shapiro v. McManus.