WASHINGTON — The Supreme Court agreed on Friday to take another look at whether the Constitution bars extreme partisan gerrymandering. The move followed two decisions in June in which the justices sidestepped the question in cases from Wisconsin and Maryland.

Those earlier cases had raised the possibility that the court might decide, for the first time, that some election maps were so warped by politics that they crossed a constitutional line. Challengers had pinned their hopes on Justice Anthony M. Kennedy, who had expressed ambivalence on the subject, but he and his colleagues appeared unable to identify a workable constitutional test.

Justice Kennedy’s replacement by Justice Brett M. Kavanaugh makes a ruling limiting partisan gerrymandering less likely, election law experts said. Indeed, the court could rule that the Constitution imposes no limits on the practice.

The court’s decision to add two new cases on the question to its docket did not signal any particular enthusiasm for the project. While the court has almost complete discretion in deciding whether to hear most kinds of cases, Congress has made an exception for some disputes concerning elections. In those cases, Supreme Court review is all but mandatory.