Justice Ruth Bader Ginsburg underscored that point by noting that women were counted when districts were drawn long before they gained the right to vote in 1920.

Justice Anthony M. Kennedy seemed to be looking for a middle ground. “You should at least give some consideration to this disparity you have among voters” in different voting districts, he said, adding that it may be possible to achieve both goals. “Why is one option exclusive of the other?” he asked.

Lawyers defending Texas’s approach said the resulting districts would be misshapen and drawn without regard to other considerations, including county lines and race.

Ian H. Gershengorn, a deputy United States solicitor general, gave an example. “Manhattan has 9 percent children,” he said. “Brooklyn has 30 percent. If you have to do both, what you’re doing is pairing people from part of Manhattan and pairing them with voters in Brooklyn.”

The Constitution requires “counting the whole number of persons in each state” for apportioning seats in the House of Representatives among the states. Justice Elena Kagan said it struck her as unlikely that a different rule should apply for purposes of drawing state districts.

“How you go from that being mandated,” she said, referring to counting everyone, “to it being prohibited in the state context is something that I still can’t quite work myself around.”

The Supreme Court has never definitively ruled on who must be counted. The “one person one vote” principle, rooted in cases from the 1960s that revolutionized democratic representation in the United States, applies to the entire American political system aside from the Senate, where voters from states with small populations have vastly more voting power than those with large ones. Everywhere else, voting districts must have very close to the same populations.