Three weeks of testimony in a federal courtroom about the 2020 census have focused on one question: Did the Trump administration add a citizenship question to the census for political gain?

On Tuesday, the final day of the trial, opponents of the citizenship question accused the administration of deliberately trying to deter noncitizens from being counted. Lawyers representing the plaintiffs — state attorneys general, city governments and a host of civil-liberties advocacy groups — said the decision to add the question had been “reverse-engineered” to add a veneer of legality, then disguised in an official record that “likely was falsified.”

The extraordinary broadside, leveled during closing arguments, drew a muted response from Justice Department lawyers defending the government, who have argued repeatedly that Commerce Secretary Wilbur L. Ross. Jr. had sweeping authority to alter the census as long as he followed minimal guidelines.

Judge Jesse M. Furman of the United States District Court for the Southern District of New York will decide, probably within a few weeks, which version of events is correct. He will almost certainly not have the last word. The citizenship case is expected to reach the Supreme Court next year, with the justices under pressure to rule before an early summer deadline to lock in the wording of 2020 census forms for printing.