A second federal judge has rejected the Trump administration's move to add a citizenship question to the 2020 census, saying Commerce Secretary Wilbur Ross acted in an "arbitrary and capricious" manner that broke the law.

U.S. District Court Judge Richard Seeborg said Ross's decision to add the question was also circumventing government procedures and lacking a factual basis for necessity. He ordered the question struck from the census.

The decision echoes one from earlier this year in a related case in the Southern District of New York. Both cases have been appealed.

Last month, the U.S. Supreme Court agreed to hear the cases on an expedited basis, setting the stage for a final decision by June when the Census Bureau has to finalize its questionnaire.

Seeborg singled out Ross for criticism.

"Nearly a year before issuing that decision, on May 2, 2017, Secretary Ross sent an email to Deputy Chief of Staff Earl Comstock stating in part 'I am mystified why nothing [has] been done in response to my months old request that we include the citizenship question. Why not?' What ensued was a cynical search to find some reason, any reason, or an agency request to justify that preordained result," Seeborg wrote in the opinion.

An envelope containing a 2018 census letter mailed to a U.S. resident as part of the nation's only test run of the 2020 Census, March 23, 2018.(Michelle R. Smith/AP, FILE) An envelope containing a 2018 census letter mailed to a U.S. resident as part of the nation's only test run of the 2020 Census, March 23, 2018.

"While it is of course appropriate for an incoming cabinet member to advocate for different policy directions, to solicit support for such views from other agencies, and to disagree with his or her professional staff, this record reflects a profoundly different scenario: an effort to concoct a rationale bearing no plausible relation to the real reason, whatever that may be, underlying the decision," Seeborg continued.

At issue in the case is the Administrative Procedures Act which requires federal agencies to carefully study all relevant evidence and facts pertaining to a problem before implementing a new policy. The agency must also publicly lay out the reasons for a decision and allow public comment.

The Census Bureau, which is part of the Commerce Department, had suggested to agency leadership that citizenship estimates could be more accurately derived from mining existing government records rather than adding a question to the 2020 census questionnaire. They said it would be potentially more effective and less expensive.

A citizenship question has not been included in a U.S. census since 1950. A coalition of local governments and immigrant advocacy groups have called the question discriminatory and unconstitutional.

Solicitor General Noel Francisco wrote in his brief to the Supreme Court that lower court decisions conflict with established legal precedent and should be overturned.

"Specifically, the district court erred in finding that respondents had standing to challenge the inclusion of a question on the decennial census form; that challenges to census questions are judicially reviewable; that the Secretary’s decision to reinstate the citizenship question was arbitrary and capricious," Francisco wrote. "Each of those rulings is contrary to the controlling principles set forth in this Court’s precedents interpreting Article III and the Administrative Procedure Act."