The Trump administration is abandoning its hard-fought plan to add a citizenship question to the 2020 census after the U.S. Supreme Court questioned its justification.

"We're glad the 2020 census will begin printing without a citizenship question," New York Attorney General Letitia James, who led a coalition of states in suing over the question, said Tuesday in a tweet.

The move is a sharp reversal for President Donald Trump, who said last week that he'd explore ways to delay the census after the Supreme Court put the plan on hold. In a 5-4 ruling, the court said Commerce Secretary Wilbur Ross's stated rationale for including the question was "contrived" and couldn't be squared with the evidence about his true motivations. The court said the administration needed to put forward a justification that could pass legal muster.

Opponents claimed that the citizenship question sought to reduce participation in the survey and that administration officials hid their true aim of boosting Republican and white voters. Ross said the goal was to help the Justice Department enforce the Voting Rights Act, which protects minority voters.

The U.S. Constitution requires a census every 10 years, and census day is set by federal law as April 1. The administration has said the 2020 census questionnaire needed to be ready for printing by June 30.

The Census Bureau's chief scientist concluded the question would cause more than 2 million households, representing about 6.5 million people, to fail to respond to the census questionnaire. The bureau said statistical modeling techniques could use existing government data to produce more accurate citizenship information.

The Constitution requires a decennial census — or an "actual Enumeration" — but doesn't provide any guidance about what information should be collected. Census-takers started asking about citizenship in 1820 but haven't posed the question to every household since 1950.