Washington — The Supreme Court heard a powerful plea for reining in partisan gerrymandering, and a majority on Tuesday seemed to lean in favor of a potential landmark ruling that for the first time would limit politicians from entrenching their party in power by clever drawing of legislative or congressional district lines.

The court has never before struck down election maps simply because they lock in an advantage for one party. But now is the time, the justices were told.

“Politicians are never going to fix gerrymandering. You are the only institution in the United States that can solve this problem,” Paul M. Smith, an attorney for Wisconsin Democrats, who brought the current case, told the justices. “And this is really the last opportunity” to act before the next round of redistricting following the census of 2020.

Justice Anthony M. Kennedy, who likely holds the deciding vote on the issue, appeared to agree. He told a Wisconsin state lawyer that he thought extreme partisan gerrymanders could be challenged on First Amendment grounds because they deny voters in the disfavored party a right to have their views represented.

That won’t work, the state attorney replied. “Let’s assume that it does,” Kennedy said.

If Kennedy holds to the position that he appeared to favor, the court would have five votes for a ruling later this term that would limit gerrymanders. That would have the potential to undermine Republican control of the House of Representatives as well as several state legislatures. Although Democrats also have practiced gerrymanders, they’ve had fewer opportunities in the current decade because they control fewer state legislatures.

Kennedy asked questions only of the lawyers defending the map drawn by Wisconsin’s Republicans. At one point, he asked one of them to imagine that a state passed a law saying its election maps will always “favor party X or party Y. Is that constitutional?” he asked.

The lawyer ducked an answer. Kennedy tried again and still got no answer. “Well, it’s a little hard to say at this point,” said the lawyer, Erin Murphy. Certainly, the Republicans had not proclaimed they were drawing maps to favor their party, she added.

Kennedy was undeterred: “I’d like an answer to the question.”

“Yes, it would be unconstitutional,” she relented.

Kennedy said nothing further in the hourlong argument, but it was clear that he believed the Constitution would prevent one party from writing a law that kept it in power for a decade. The only remaining question was whether he believed Wisconsin’s Republicans had done essentially that when they went behind closed doors in 2011 and used computerized maps to assure their hold on the state legislature.

In 2010, Republicans nationwide scored big wins at the polls and took full control in at least half a dozen closely divided states. They used that power to draw election maps that strongly favored their party’s candidates. Pennsylvania, Michigan, Ohio and North Carolina, for example, have 61 representatives among them in the U.S. House, of which 44 are Republicans and only 17 are Democrats, even though voters in those states are closely divided between the two parties.

In Wisconsin, the election map assured the GOP would have a supermajority of at least 60 seats in the 99-member state Assembly, even in elections such as 2012 when Republican candidates won just 48 percent of the vote. Last year, a three-judge court struck down the map, leading to the current case, Gill v. Whitford.

Gerrymandering has been part of American politics since the earliest days. The word, itself, comes from the name of an early 19th-century governor of Massachusetts, Elbridge Gerry, whose party drew a legislative map with a district that resembled a salamander.