WASHINGTON — The Supreme Court appeared unlikely Tuesday to rule that federal courts have a role in deciding how much partisanship is too much when state legislatures draw the maps for voting districts.

In the past, the court has said that because redistricting is essentially a partisan political act, it would be impossible to determine when partisan gerrymandering became unconstitutional. Based on Tuesday's courtroom argument, a majority of the justices have not been persuaded that there's a way around that problem.

The court heard challenges to congressional redistricting plans that locked in an advantage for Republicans in North Carolina and that gave an extra seat to Democrats in Maryland.

The two newest justices, both appointed by President Donald Trump, said the Supreme Court should be especially reluctant to open the door to challenges based on excessive partisanship, given that more states are adopting methods such as redistricting commissions that take the map-drawing assignment away from legislatures.

"I don't dispute that extreme partisanship is a real danger in our country," Justice Brett Kavanaugh said. "But there's a fair amount of activity going on in the states to deal with it."

Justice Neil Gorsuch expressed a similar concern. "Why should we wade into this when there are alternatives that exist?"

After the 2010 census, North Carolina's legislature drew a map intended to maintain the partisan breakdown of the state's congressional delegation — 10 Republicans and three Democrats. Several justices Tuesday called that an extreme example of partisan gerrymandering.

"I understand it's an extreme case," Chief Justice John Roberts said. "But we have to find a rule that will apply to other states" for determining when partisanship is so blatant that it crosses a constitutional line.

Justice Stephen Breyer proposed a way to identify the worst examples. His test would say a line is crossed when a political party in the minority ends up with two-thirds of a state's congressional seats. But there appeared to be no takers among his colleagues.

The court also heard a challenge to the redrawing of Maryland's 6th Congressional District in 2011, which allowed Democrats to take over a seat in the House that Republican Roscoe Bartlett held for two decades.

Several of the court's more liberal members said they were open to finding a way to strike down excessive examples of partisan gerrymandering. As it stands now, said Elena Kagan, "We're leaving it to the professional politicians who have an interest in perpetuating their own representation."

But Paul Clement, a Washington lawyer representing North Carolina's legislature, warned the justices to stay out of second-guessing states on how they do their re-districting. "If you get into this business, once you get into the political thicket, you will never get out."

The court's five conservatives appeared to agree. A decision in the two cases will be issued by late June.