(Reuters) - U.S. Commerce Secretary Wilbur Ross must sit for questioning by lawyers for states that are suing the Trump administration over a planned question in the 2020 census that would ask respondents whether they are U.S. citizens, a federal judge ruled Friday.

FILE PHOTO: U.S. Commerce Secretary Wilbur Ross attends a cabinet meeting at the White House in Washington, U.S., July 18, 2018. REUTERS/Leah Millis

U.S. District Judge Jesse Furman in Manhattan ruled that Ross, who oversees the census, must submit to a four-hour deposition because his “intent and credibility are directly at issue” in the litigation.

A spokesman for the Commerce Department declined to comment.

The census, mandated by the U.S. Constitution, is conducted every 10 years and counts every resident in the United States.

It is used to determine the distribution of billions of dollars in federal funds to communities and the allocation to states of seats in the U.S. House of Representatives.

The Commerce Department has been sued by states, cities and advocacy groups seeking to block the citizenship question. They have argued that the question will lead to undercounting in states with large immigrant populations, jeopardizing their political representation and access to federal funds. [nL2N1RG0X6]

The opponents have said that an “unprecedented level of anxiety in immigrant communities” under President Donald Trump, a Republican who has vowed to crack down on illegal immigration, could deter noncitizens from responding to the census.

Furman said in his order on Friday that deposing Ross was necessary to gather evidence on whether his motivation for adding the citizenship question was improper or discriminatory.

The Commerce Department said in March that Ross decided to add the citizenship question after the Department of Justice requested it, in order to better enforce federal voting law. [nL1N1R904F]

However, plaintiffs in the litigation have said that reason was merely a pretext. In a July order allowing the litigation to go forward, Furman said there was evidence for that claim. [nL1N1UM0ZH]

The administration has opposed Ross’s deposition.

Furman wrote Friday, “There is something surprising, if not unsettling, about defendants’ aggressive efforts to shield Secretary Ross from having to answer questions about his conduct.”

All of the states involved in the lawsuit have Democratic attorneys general and the cities have Democratic mayors. The United States Conference of Mayors, a bipartisan group, is also a plaintiff.