WASHINGTON — When state legislatures draw the boundary lines for voting districts, the majority party typically comes up with a map designed to keep itself in power. But can that become so blatantly political that it violates the Constitution? And how can the courts tell how much partisanship in politics is too much?

The U.S. Supreme Court takes up those questions Tuesday, returning to an issue that the justices have so far found impossible to answer. Political reformers hope the court will issue a ruling that could change the future of American politics, by allowing voting districts to become more competitive.

The court hears two challenges to redrawn boundaries for congressional districts that gave an advantage to the party in power — Republicans in North Carolina and Democrats in Maryland. In both cases, groups of voters sued and lower courts declared the maps to be unconstitutional partisan gerrymanders.

After the 2010 census, North Carolina's legislature drew a new district map, but a federal court threw it out, finding that it put racial minorities at a disadvantage. In 2016, the legislature came up with a revised plan and declared that politics, not race, was the guiding factor the second time around.

The committee designing the revision freely admitted that it was intended to maintain the partisan breakdown of the state's congressional delegation — ten Republicans and three Democrats. One state representative, asked why the legislature wanted to preserve that ratio, joked, "because I do not believe it's possible to draw a map with eleven Republicans and two Democrats."

In Maryland, Republican voters challenged the redrawing of Maryland's 6th Congressional District in 2011, which allowed Democrats to take over a seat in the US House that Republican Roscoe Bartlett held for two decades. He had been re-elected in 2010 by a 28 percent margin. After the redistricting, he lost by 21 percent.

Democrat Martin O'Malley, Maryland's governor at the time, made no secret of the motive behind the new map. The intent was to "create a district where the people would be more likely to elect a Democrat than a Republican."

Confronted with similar challenges in the past, the Supreme Court concluded that because redistricting is essentially a partisan political act, it would be impossible for the courts to know when gerrymandering became unconstitutional. In 2004, the court rejected a claim that a Pennsylvania gerrymander was too partisan, though Justice Anthony Kennedy indicated then such a lawsuit might succeed if the right kind of proof came along.

During its last term, the court again dodged the partisan gerrymandering question, citing procedural shortcomings in cases from Wisconsin and Maryland. This time, the issue is presented more directly. But with Kennedy gone, replaced by the more conservative Brett Kavanaugh, it's likely the Supreme Court will conclude that this is a political matter for state legislatures to resolve, not the courts.

One problem is coming up with a legal test for determining when there's too much partisanship at work. The challengers in the North Carolina case say it's not that hard. They say the line is crossed when a state targets minority party voters by spreading them out among districts where they cannot form a majority and jamming the remaining ones together to minimize the number of districts they can win.

That view is supported by 40 current and former members of the U.S. House of Representatives, evenly divided between Republicans and Democrats. "Artificially drawn 'safe' districts tend to make general elections less competitive and give party insiders, or small groups of 'base' primary voters, much greater influence than the general electorate." As a result, they say in a friend of court brief, Congress becomes less able to compromise or govern effectively.

But Republican legislators in North Carolina say this is not an issue for judges. "The time has come for this court to make clear that the Constitution does not provide courts with the tools or the responsibility to say how much partisan motivation is too much," they say in their court filings.

The Supreme Court will issue its decision by late June.