New York • A federal judge blocked the Trump administration Tuesday from asking about citizenship status on the 2020 census, the first major ruling in cases contending that officials ramrodded the question through for Republican political purposes to intentionally undercount immigrants.

In a 277-page decision that won't be the final word on the issue, Judge Jesse M. Furman ruled that while such a question would be constitutional, Commerce Secretary Wilbur Ross had added it arbitrarily and not followed proper administrative procedures.

"He failed to consider several important aspects of the problem; alternately ignored, cherry-picked, or badly misconstrued the evidence in the record before him; acted irrationally both in light of that evidence and his own stated decisional criteria; and failed to justify significant departures from past policies and practices," Furman wrote.

Ross' explanations for his decision were "unsupported by, or even counter to, the evidence before the agency," the judge said.

Among other things, the judge said, Ross didn't follow a law requiring that he give Congress three years notice of any plan to add a question about citizenship to the census.

The ruling came in cases in which 18 states, the District of Columbia, and 15 big cities or counties, and immigrants' rights groups argued that the Commerce Department, which designs the census, had failed to properly analyze the effect the question would have on households where immigrants live.

A trial on a separate suit on the same issue, filed by the state of California, is underway in San Francisco. The U.S. Supreme Court is also poised to address the issue Feb. 19, meaning the legal issue is far from decided for good.

"We are disappointed and are still reviewing the ruling," Justice Department spokeswoman Kelly Laco said in a statement.

In the New York case, the plaintiffs accused the administration of Republican President Donald Trump of adding the question to intentionally discourage immigrants from participating, which could lead to a population undercount — and possibly fewer seats in Congress — in places that tend to vote Democratic.

Even people in the U.S. legally, they said, might dodge the census questionnaire out of fears they could be targeted by a hostile administration.

The Justice Department argued that Ross had no such motive.

Ross' decision to reinstate a citizenship question for the first time since 1950 was reasonable because the government has asked a citizenship question for most of the past 200 years, Laco said.

When Ross announced the plan in March, he said the question was needed in part to help the government enforce the Voting Rights Act, a 1965 law meant to protect political representation of minority groups.

Furman, appointed to the bench by former President Barack Obama, said, "Finally, and perhaps most egregiously, the evidence is clear that Secretary Ross's rationale was pretextual," meaning Voting Rights Act enforcement was not his real reason.

New York Attorney General Letitia James, whose office was among those that litigated the lawsuit, called the decision a win for "Americans who believe in a fair and accurate count of the residents of our nation."

Officials in Massachusetts, one of the states participating in the litigation, applauded the ruling.

"The census is meant to count every person residing in the United States, and attempting to frighten immigrant communities into not responding was a clear and deliberate effort to depress the count in states like Massachusetts," said Secretary of the Commonwealth William Galvin, a Democrat.

Ross said politics played no role in the decision, initially testifying under oath that he hadn't spoken to anyone in the White House on the subject.

Later, however, Justice Department lawyers submitted papers saying Ross remembered speaking in spring 2017 about adding the question with former senior White House adviser Steve Bannon and with then-Attorney General Jeff Sessions.

The U.S. Supreme Court blocked Ross from being deposed, but let the trial proceed, over the objections of Justices Samuel Alito, Clarence Thomas and Neil Gorsuch.

The constitutionally mandated census is supposed to count all people living in the U.S., including noncitizens and immigrants living in the country illegally.

The Census Bureau's staff estimated that adding a citizenship question could depress responses in households with at least one noncitizen by as much as 5.8 percent. That could be particularly damaging in states like New York or California, which have large immigrant populations.

Justice Department lawyers argued that the estimate was overblown and that, even if they were true, that didn't mean Ross exceeded his legal authority in putting the question on anyway.

However, Furman said, Ross violated the law by falling short on requirements that his agency consider all important aspects of a problem, study evidence, make a decision rationally based on that evidence, comply with all laws and articulate "the real reasons" for its conclusion.

The administration faces an early summer deadline for finalizing questions so questionnaires can be printed.

___

Associated Press Writers Bob Salsberg in Boston and Eric Tucker in Washington contributed to this report.

___