The Trump administration suffered another loss Friday in its efforts to add a citizenship question to the 2020 census.

In a 119-page ruling, U.S. District Judge George Hazel of the U.S. District Court in Maryland found the decision to add the citizenship question to the upcoming census violated the Administrative Procedure Act and the Constitution’s Enumeration Clause.

“The unreasonableness of defendants’ addition of a citizenship question to the Census is underscored by the lack of any genuine need for the citizenship question, the woefully deficient process that led to it, the mysterious and potentially improper political considerations that motivated the decision and the clear pretext offered to the public,” Hazel said in his ruling.

Hazel said that an undercount of Hispanics and noncitizens “of any magnitude” will lead to vote dilution and a malapportionment of congressional districts. It will also cause communities to lose federal funding, he said.

Hazel is the third federal judge to block the Commerce Department from proceeding with its plan.

The Commerce Department announced in March 2018 it would add a citizenship question to the 2020 census and said at the time doing so would lead to better enforcement of the Voting Rights Act.

But the move by Commerce Secretary Wilbur Ross was quickly challenged in federal courts from coast to coast, with states, cities, and immigrant rights groups warning the decision to add the question was unlawful and unconstitutional.

The groups and states argued including the citizenship question would lead to a population undercount that would disproportionately affect states and cities with large immigrant populations.

After the Commerce Department’s announcement, questions began to arise over where the request to add a question about citizenship originated. Ross told Congress the agency was acting in response to a request from the Justice Department in December 2017.

Hazel, however, cited in his ruling emails indicating Ross’s interest first surfaced in March 2017, just days after he was confirmed by the Senate to helm the Commerce Department.

“The secretary’s own statements, along with the emails and documents contained in the administrative record, establish that the secretary was pursuing a citizenship question with urgency long before he had any awareness of the purported [Voting Rights Act]-enforcement rationale, which the record shows was manufactured by his staff,” Hazel said.

"At best," he continued, "the secretary ignored clear evidence that the citizenship question could harm the distributive accuracy of the Census for some mysterious reason known only to him. At worst, the secretary intended to negatively affect the distributive accuracy of the Census by reducing immigrant response rates to the Census. Both possibilities disregard the need to accomplish an actual enumeration of the population — the constitutional purpose of the Census."

In January, a federal judge in New York said the decision to add the question to the census questionnaire was illegal and barred the administration from proceeding with its plan to do so. Then, in March, a federal judge in California ruled the efforts violated federal law and the Constitution.

The Supreme Court agreed in February it would take up a case challenging the Trump administration's addition of the citizenship question and will hear arguments April 24.

The cases have not yet been heard by federal appeals courts, but the Justice Department urged the high court to step in due to time constraints for painting the questionnaires.