The supreme court’s conservative majority seemed ready on Tuesday to uphold the Trump administration’s plan to ask about citizenship on the 2020 census, despite evidence that millions of Hispanic people and immigrants could go uncounted. The case could affect American elections for the next decade.

There appeared to be a clear divide between the court’s liberal and conservative justices in arguments in the case, which could affect how many House seats states have and their share of federal dollars. States with a large number of immigrants tend to vote Democratic.

Three lower courts have so far blocked the plan to ask every US resident about citizenship in the census, finding that the question would discourage many immigrants from being counted. Two of the three judges also ruled that asking if people are citizens would violate the provision of the US constitution that calls for a count of the population, regardless of citizenship status, every 10 years. The last time the question was included on the census form sent to every American household was 1950.

Three conservative justices, Samuel Alito, Neil Gorsuch and Clarence Thomas, had expressed skepticism about the challenge to the question in earlier stages of the case, but the chief justice, John Roberts, and Brett Kavanaugh had been silent, possibly suggesting a willingness to disrupt the administration’s plan.

However, during 80 minutes in a packed courtroom, neither Roberts nor Kavanaugh appeared to share the concern of the lower court judges who ruled against the administration.

Kavanaugh, the court’s newest member and an appointee of Donald Trump, suggested Congress could change the law if it was concerned that the accuracy of the once-a-decade population count will suffer. “Why doesn’t Congress prohibit the asking of the citizenship question?” Kavanaugh asked near the end of the morning session.

Kavanaugh and the other conservatives were mostly silent when the solicitor general, Noel Francisco, the administration’s top supreme court lawyer, defended the decision of the commerce secretary, Wilbur Ross, to add the citizenship question. Ross has said the justice department wanted the citizenship data, and the detailed information it would produce on where eligible voters live, to improve enforcement of the Voting Rights Act.

Lower courts found that Ross’s explanation was a pretext for adding the question, noting that he had consulted early in his tenure with Stephen Bannon, Trump’s former top political adviser and the immigration hardliner Kris Kobach, the former secretary of state for Kansas.

The liberal justices peppered Francisco with questions about the administration plan, but they would lack the votes to stop it without support from at least one conservative justice.

“This is a solution in search of a problem,” Sonia Sotomayor, the court’s lone Hispanic member, said of Ross’s decision.

Justice Elena Kagan chimed in: “You can’t read this record without sensing that this need was a contrived one.”

Roberts appeared to have a different view of the information the citizenship question would produce.

“You think it wouldn’t help voting rights enforcement?” Roberts asked New York’s solicitor general, Barbara Underwood, who was representing states and cities that sued over Ross’s decision.

Underwood and the American Civil Liberties Union lawyer Dale Ho said the evidence showed the data would be less accurate. Including a citizenship question would “harm the secretary’s stated purpose of Voting Rights Act enforcement”, Ho said.

Census bureau experts have concluded that the census would produce a more accurate picture of the US population without a citizenship question because people might be reluctant to say if they or others in their households are not citizens. Federal law requires people to complete the census accurately and fully.

The supreme court is hearing the case on a tight timeframe, even though no federal appeals court has yet to weigh in. A decision is expected by late June, in time to print census forms for the April 2020 population count.

Douglas Letter, a lawyer representing the House of Representatives, said the census is critically important to the House, which apportions its seats among the states based on the results. “Anything that undermines the accuracy of the actual enumeration is immediately a problem,” Letter said, quoting from the provision of the constitution that mandates a decennial census.