A third federal judge has struck down the Trump administration's plan to include a citizenship question on the 2020 census just weeks before the U.S. Supreme Court will consider the matter.

District Court Judge George Hazel of Maryland determined that the Commerce Department, led by Secretary Wilbur Ross, made an "arbitrary and capricious" decision to add the question to the survey and violated the Constitution "by unreasonably compromising the distributive accuracy of the Census" -- a risk of undercounting, in other words.

Hazel ordered the administration to remove the question from the census questionnaire.

While critics of the administration have alleged that Ross is motivated by animus against Hispanics and other minorities, Judge Hazel said there was insufficient evidence to support claims of "invidious racial discrimination" or attempts to violate civil rights by including the question.

Earlier this year, federal judges in two separate legal challenges to the citizenship question reached similar conclusions and ordered it struck from the Census.

The Supreme Court later agreed to hear an expedited appeal by the Commerce Department, which said it needs to finalize the census questionnaire for printing no later than June 30. Oral arguments have been scheduled for April 23.

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 add a question to the 2020 census questionnaire. They said it would be potentially less effective and more expensive.

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