A federal judge in Washington ruled Friday the 2020 Census can ask if respondents are U.S. citizens.
A civil liberties group asked the court to forbid the new question from being added to the 2020 census citing privacy concerns.
It argued the Census Bureau broke the law by not completing a privacy impact assessment before the question was announced.
Federal lawyers admitted the government must do the assessment, but said it has until census responses are collected to do so.
The judge sided with them and refused to block the question.
Last month, a federal judge in New York made an opposite ruling and ordered the question to be removed on different grounds.
That case is awaiting consideration by the supreme court.
There are also several other similar cases challenging the citizenship question.