WASHINGTON (Reuters) - With a court deadline looming, the Trump administration is looking at “every option” as it seeks to add a contentious citizenship question to the 2020 census, a White House spokesman said on Thursday.

Government lawyers are scrambling to meet a Friday afternoon deadline set by Maryland-based U.S. District Court Judge George Hazel, who wants the administration to state its intentions.

The Supreme Court last week blocked the inclusion of the question, saying administration officials had given a “contrived” rationale for including the query in the decennial population survey. But it left open the possibility that the administration could offer a plausible rationale.

The White House said it was looking at all options to get the question onto the form.

“The Supreme Court ruled that it is legal to have a citizenship question in the census if there’s an appropriate explanation – and it should come as no surprise President Trump is looking at every option within his legal authority to add such a question,” White House spokesman Hogan Gidley said in an email.

Commerce Secretary Wilbur Ross on Tuesday said the Census Bureau had started the process of printing the census questionnaires without the citizenship query, giving the impression that the administration had backed down.

Trump ordered a policy reversal via tweet on Wednesday, saying he would fight on, although the government has said the printing process continues.

Slideshow ( 4 images )

“Department of Commerce and the Department of Justice are working very hard on this, even on the 4th of July!” Trump tweeted on Thursday, hours before he planned to preside over Independence Day celebrations in Washington.

The census is used to allot seats in the U.S. House of Representatives and distribute some $800 billion in federal services, including public schools, Medicaid benefits, law enforcement and highway repairs.

Critics have called the citizenship question a Republican ploy to scare immigrants into not participating and engineer a population undercount in Democratic-leaning areas with high immigrant populations. They say that officials lied about their motivations for adding the question and that the move would help Trump’s fellow Republicans gain seats in the House and state legislatures when new electoral district boundaries are drawn.

Trump and his supporters say it makes sense to know how many non-citizens are living in the country. His hard-line policies on immigration have been a key element of his presidency and 2020 re-election campaign.

Trump’s administration had told the courts that its rationale for adding the question was to better enforce a law that protects the voting rights of racial minorities.

A group of states including New York and immigrant rights organizations challenged the legality of the citizenship question. Three different federal judges blocked the administration before the Supreme Court intervened.

Slideshow ( 4 images )

Administration officials had repeatedly told the Supreme Court they needed to finalize the details of the census questionnaire by the end of June.

A senior Justice Department lawyer told Hazel late on Wednesday that the agency was instructed to examine whether there is a path forward to add the question in an abrupt reversal from the previous day.

If the administration does not detail its plans by Friday, Hazel said he would press ahead with considering allegations that the decision to add the question was motivated by racial bias.

Jens David Ohlin, a professor at Cornell Law School, said an executive order was unlikely to solve the issue.

“The census is handled by the Commerce Secretary. The Supreme Court concluded that there was a ‘mismatch’ between Wilbur’s decision and his explanation for it,” Ohlin said. “Any new explanation would have to come from Ross and would need to cycle through the federal courts.”

That process could take weeks or months. “Given the printing deadline, I don’t see how all of this could happen in time,” Ohlin said.