(CNN) In a major reversal following a presidential tweet, Justice Department lawyers told a federal judge in Maryland on Wednesday that they have been told to try to add a question on citizenship to the 2020 census in a way that's consistent with a Supreme Court ruling.

The change comes after President Donald Trump tweeted earlier on Wednesday that "we are absolutely moving forward, as we must" on the citizenship question, despite statements Tuesday from both his Department of Justice and his secretary of commerce that the administration was printing the census without the question.

"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," Jody Hunt, the assistant attorney general for the Civil Division, told the judge Wednesday afternoon.

Government attorneys painted a picture of disarray within the administration, even as the Census Bureau moves ahead with printing the survey without the controversial question asking, "Is this person a citizen of the United States?"

The Supreme Court blocked, for now, the question from being on the census in a decision last week, which hinged on Chief Justice John Roberts concluding there was sufficient reason for concern about why the administration wanted to ask the question. Roberts had not ruled out that the Department of Commerce could come back with a new rationale.

Hunt told Judge George Hazel in a teleconference that if the administration finds a viable path to include the question on the decennial survey, it plans to return to the Supreme Court for "instructions ... to simplify and expedite the remaining litigation and provide clarity to the process going forward."

The judge requested more information from the Justice Department by 2 p.m Friday.

In a separate case in New York on Wednesday, the Justice Department attorney told a federal judge that while the department had told counsel on Tuesday that the questionnaire would not include a question about respondents' citizenship status, it has shifted its position.

"The Departments of Justice and Commerce have now been asked to reevaluate all available options following the Supreme Court's decision and whether the Supreme Court's decision would allow for a new decision to include the citizenship question on the 2020 decennial census," Hunt said.

Hazel told attorneys that he has a Twitter account and follows Trump. He said the tweet Wednesday morning "directly contradicted the position" the Justice Department articulated on Tuesday.

Sudden shift

In the Wednesday hearing, another Justice Department attorney told the judge that the administration has instructed printing to move forward without the citizenship question, but also acknowledged the situation is fluid.

The attorney, Joshua Gardner, acknowledged he was now backing away from his statements made only a day earlier, when he suggested that a final decision had been made.

Gardner said that he had "confirmed that the Census Bureau is continuing with the process of printing the questionnaire without a citizenship question, and that process has not stopped," but he said the President's tweet Wednesday morning could change the government's ultimate position.

"The tweet this morning was the first I had heard of the President's position on this issue, just like the plaintiffs and your honor," Gardener told the judge.

"I do not have a deeper understanding of what that means at this juncture other than what the President has tweeted," he said, adding, "I am doing my absolute best to figure out what is going on."

The plaintiffs challenging the question in the Maryland court were highly critical of the government's change in position.

"This administration's flagrant disregard of court orders is appalling, and will result in the same kind of misinformation that leads our communities to be reluctant to participate in the Census, at a time when the Census Bureau should be actively encouraging everyone's full participation," said Denise Hulett, the lead counsel in the case for the Mexican American Legal Defense and Educational Fund.

When the government asked for an extension until Monday, the judge refused and questioned whether the Justice Department was speaking for the President.

"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,"Hazel said.

After the lashing, Gardner told the judge he'd been with the Justice Department for 16 years "through multiple administrations" and that he had "always endeavored to be as candid as possible with the court."

Tweet sends administration scrambling

The news comes after Trump's tweet sent administration officials scrambling.

A White House official said earlier Wednesday afternoon that there were ongoing discussions at the White House about finding a path forward for the government to continue to press its case on getting the citizenship question on the census, even though printing is now underway without the question.

This official suggested the printing process and Trump's vow to keep fighting this issue are not necessarily mutually exclusive -- or at least that administration lawyers are trying to figure out how to square the two.

The discussions and confusion at the White House came a day after a Justice Department Attorney, Kate Bailey, notified plaintiffs challenging the question via email that she could "confirm that the decision has been made to print the 2020 Decennial Census questionnaire without a citizenship question, and that the printer has been instructed to begin the printing process."

The Department of Justice later confirmed the question would not be on the census. And Commerce Secretary Wilbur Ross issued a statement saying, "The Census Bureau has started the process of printing the decennial questionnaires without the question" even though he said he disagreed with the Supreme Court ruling.

In addition, during a hearing Tuesday evening, a federal judge asked the department whether the decision was "final" and the Department of Justice said that it was, according to plaintiff's lawyers participating in the call.

On Tuesday night, another lawyer involved in a separate case, expressed some skepticism that the administration's position could change.

"We're happy about the development but want to make sure it is thorough and complete," said Thomas Saenz, president of the Mexican American Legal Defense and Educational Fund. He told CNN on Tuesday he was concerned that the administration might find other ways to undermine the count.

A fluid situation

The government had initially said that Monday was the deadline to begin printing forms. As late as Monday afternoon, however, the administration asked Hazel for more time to decide how it would proceed following the Supreme Court decision. The outcome was uncertain until Tuesday because the Supreme Court ruling last week that blocked the question from appearing for the time being had left the door open for the administration to present a new rationale.

On the one hand, it is true that the government was facing a daunting timeline. A Census official had testified at trial that extending the deadline to October under the current budget would "impair the Census Bureau's ability to timely administer the 2020 census" and that it would only be feasible with "exceptional resources."

On top of that, there were collateral legal actions set to occur over the summer in two lower courts that were sure to drag out. US District Court Judge Jesse M. Furman of the US District Court for the Southern District of New York was considering a sanctions motion against the government after a trove of documents surfaced from the files of a deceased redistricting expert raising the question of whether the decision was politically motivated. And Hazel, based on those same files, was set to order deposition and new discovery aimed at learning more about the government's rationale for adding the question.

Still, the decision came as a surprise.

Another thing that could have been in play was the testimony of Census Bureau officials that there were other ways to get citizenship data. In a memorandum, Census Bureau official John Abowd recommended that Commerce use existing administrative records — from the Social Security Administration and the Internal Revenue Service — instead of adding the question. Ross ultimately chose to do both: Ask the question and compile the administrative records. In May, Abowd said the bureau was operating with the understanding that the administrative records needed to be assembled regardless of whether the courts allowed the question to be included.

In addition, there is another survey that is sent to one out of 36 households that asks the question.

This story has been updated to reflect news developments on Wednesday evening.