WASHINGTON — The Trump administration reversed course again on the controversial issue of putting a citizenship question on the 2020 census, as Justice Department lawyers told a federal court Wednesday that they had been “instructed” to try to find a way to add the question, despite statements from the administration Tuesday that they were giving up the effort.

The Commerce Department, which oversees the Census Bureau, said Tuesday that it would begin printing forms without the citizenship question, retreating from the legal battle.

The government was running out of time to begin printing the millions of forms, and court injunctions continue to bar the administration from adding a question to all forms asking whether household members are U.S. citizens.

But President Donald Trump, in a tweet Wednesday, said reports that he had given up the fight were “incorrect or, to state it differently, FAKE!”

A White House official declined to comment on what Trump’s tweet meant and whether it had changed the administration’s policy, which is hemmed in by deadlines and legal requirements.

But in a court appearance late Wednesday, Trump attorneys indicated — much to the frustration of a federal judge — that they may yet try to find a way to include the question in 2020.

“We at the Department of Justice have been instructed to examine whether there is a path forward, consistent with the Supreme Court’s decision, that would allow us to include the citizenship question on the census,” said Joseph Hunt, assistant attorney general for the department’s civil division. “We think there may be a legally available path under the Supreme Court’s decision. We’re examining that, looking at near-term options to see whether that’s viable and possible.”

Hunt said the administration plans to go back to the Supreme Court and seek guidance on how to proceed.

“Our current plan,” he said, “would be to file a motion in the Supreme Court to request instructions on remand to govern further proceedings in order to simplify and expedite the remaining litigation and to provide clarity to the process going forward.”

U.S. District Judge George Hazel, who is hearing one of the legal challenges to the citizenship question, voiced exasperation at the changing and conflicting positions.

“If you were Facebook and an attorney for Facebook told me one thing, and then I read a press release from Mark Zuckerberg telling me something else, I would be demanding that Mark Zuckerberg appear in court with you the next time because I would be saying I don’t think you speak for your client anymore,” the judge said.

Joshua Gardner, another Justice Department attorney, told the court he first heard about the new position from Trump’s morning tweet.

“This is a very fluid situation which we are trying to get our arms around and, obviously, once we get more information, we will communicate that immediately to the court and the parties,” Gardner said.

Experts say including the question would likely discourage many people from responding to the census, lowering the official population counts in states with large immigrant communities. That could cost those states congressional seats and billions of dollars in federal funds that are distributed based on population.

Commerce Secretary Wilbur Ross, who oversees the census, issued a statement Tuesday saying that he had “started the process of printing the decennial questionnaires without the question.” The Commerce Department did not respond to a request for further comment after Trump’s tweet.

The Supreme Court issued a 5-4 decision last week that stopped Ross from including the question, ruling that Ross had “contrived” the rationale for adding it.