The Supreme Court ruled Thursday against adding a question about citizenship to the US census in a setback for President Donald Trump and victory for critics who say the item would lead to severe undercounts of immigrants.
Chief Justice John Roberts tipped the balance by siding with the court's liberal minority to block the Trump administration bid for the question to be added to its 2020 census.
The 5-4 ruling said the government's arguments were "contrived."
However, the decision left open the possibility that the Trump administration could still seek to make new justifications.
Trump, who is in Japan for the G20 summit, said on Twitter that not having the citizenship question was "totally ridiculous."
He said government lawyers would now try to have the 2020 census delayed -- "no matter how long" -- in order to give the Supreme Court "additional information" and get a new decision.
In a separate ruling, the top court's conservative majority refused to rule against electoral redistricting practices, known as gerrymandering, that tend to favour the party in power.
Held only once every 10 years, the census is instrumental in apportioning some USD 675 billion in federal funding to states and cities, and also determines the number of seats allocated to each state in the House of Representatives.
Despite Trump's frequent claim that the census is "meaningless" without asking if respondents are US citizens, that question has not appeared on the survey since 1950.
Critics, backed by the Census Bureau's experts, said a citizenship question would drive many immigrants to avoid answering out of fear of being caught up in Trump's hardline crackdown on illegal immigration -- rendering them invisible.
The bureau's experts said that 1.6 to 6.5 million immigrants, notably Hispanics, would avoid the census or lie to census takers.
The American Civil Liberties Union hailed the decision as "a victory for immigrants and communities of color across America."
Opposition was led by some 20 states, including Democratic-led California and New York, as well as major cities like Chicago and San Francisco, which filed legal actions against inclusion of the question.
When lower courts ruled against the question, the Trump administration asked the nation's highest court to intervene.
In arguments before the justices in April, Solicitor General Noel Francisco said a citizenship question "has been asked as part of the census in one form or another for nearly 200 years."
Francisco was cut short by Justice Sonia Sotomayor who noted that the Trump administration was actually seeking to reinstate something that had been dropped for more than half a century.
"There's no doubt that people will respond less because of the census. That's been proven in study after study," she said.
In the second case decided Thursday, the court's conservative majority turned down challenges to electoral maps drawn up by two states.
A North Carolina map had been criticized as too favourable to Republicans and a Maryland map as benefiting Democrats.
In another five to four decision, the justices ruled that the courts had no role to play under the constitution in what the framers understood to be a political matter.
"We conclude that partisan gerrymandering claims present political questions beyond the reach of the federal courts," Roberts wrote, in the majority opinion.
"There are no legal standards discernible in the Constitution for making such judgments, let alone limited and precise standards that are clear, manageable, and politically neutral."
In the United States, electoral maps are redrawn in each state every 10 years when a new census is taken. The party in power often profits by concentrating opposition voters in certain districts in order to diminish their influence elsewhere.
The practice is known as "gerrymandering", a word that compounds the name of an 18th century governor, Elbridge Gerry, with salamander. Gerry had devised a district in his state so torturously that it took the shape of the lizard-like amphibian.
Facilitating the practice is the fact that in most states voters are encouraged to register as "Democrat", "Republican" or "independent," designations that enable them to take part in their party's primaries.
Former California governor Arnold Schwarzenegger called on the court to "terminate gerrymandering," telling the protesters that the villain was not parties but politicians who "keep drawing the district lines to keep their jobs rather than representing the people."