A Republican consultant involved in the Trump administration’s plan to add a citizenship question to the 2020 census believed that adding the question would pave the way for redistricting that would increase the political power of “Republicans and Non-Hispanic Whites,” according to explosive documents revealed in federal court Thursday.

The consultant, Thomas Hofeller, ghostwrote at least portions of what would later become the Justice Department’s formal request to add the citizenship question to the census, according to the court documents. The civil rights and immigration advocacy groups that oppose adding the citizenship question to the census and are suing to block it argue that the Trump administration added the question in order to dilute the political power of Democrats and minorities. The documents they filed in court Thursday are the closest they’ve found to a smoking gun.

A federal judge blocked the Trump administration from adding the citizenship question to the census in January; the case is now before the Supreme Court, which heard oral arguments in the case in April. The Trump administration has claimed that it wants to add the citizenship question to aid its efforts to enforce the Voting Rights Act. The groups suing to block the citizenship question say that’s a pretext, and the Trump administration’s real goals are to have fewer minorities respond to the survey and to exclude noncitizens from redistricting. In April, the high court’s conservative majority seemed unpersuaded by the argument that the Commerce Department had made an unreasonable decision in adding the question. A ruling is expected by the end of June.

The American Civil Liberties Union filed a notice with the Supreme Court alerting it to the filing on Thursday, but the Hofeller documents are not yet included in the official record before the court. It’s not yet clear whether lawyers will fight to make the documents part of the official record or whether the court will allow them to do so.

An inaccurate census would have severe consequences: In addition to being used to draw electoral districts, nearly $880 billion in federal funds are allocated annually based on census data, and businesses rely on it to make key decisions.

A Justice Department spokeswoman said Thursday that the allegations in the filing were baseless.

“These eleventh-hour allegations by the plaintiffs, including an accusation of dishonesty against a senior Department of Justice official, are false. Before today, Mr. Gore had never heard of the unpublished study apparently obtained from the personal effects of a deceased political consultant,” the spokesperson said in a statement, referring to John Gore, a top official in the Justice Department’s civil rights division.

“That study played no role in the Department’s December 2017 request to reinstate a citizenship question to the 2020 decennial census. These unfounded allegations are an unfortunate last-ditch effort to derail the Supreme Court’s consideration of this case. The Department looks forward to responding in greater detail to these baseless accusations in its filing on Monday.”

Hofeller, who died last year, was known for drawing maps that gerrymandered districts to protect Republican control.

“The new documents unearthed this week reveal why Republicans do not want our investigation to succeed — they suggest that the Trump Administration added the citizenship question not to help enforce the Voting Rights Act, which was the pretext they tried to sell the American people, but to gerrymander congressional districts in overtly racist and partisan ways,” said Rep. Elijah Cummings (D-Md.), chairman of the House Oversight Committee, which has also been probing the decision to add a citizenship question.

After Hofeller died last August, his estranged daughter obtained hard drives containing backups of his files, according to The New York Times. Lawyers for Arnold & Porter Kaye Scholer LLP, who are representing Common Cause in a gerrymandering lawsuit in North Carolina, subpoenaed those hard drives earlier this year. The hard drives contained the documents relevant to the census case, where Arnold & Porter is also representing some of the plaintiffs.

The filing also accuses two Trump administration officials of lying under oath in testimony about the role Hofeller played in getting the question on the census. Gore said in a deposition that he drafted the department’s formal request for a citizenship question, but only disclosed in congressional testimony after the lower court’s ruling that Mark Neuman, a top Commerce Department official, gave him an earlier draft of the document.

Lawyers for the plaintiffs obtained documents from the late Hofeller’s hard drives that they say show he had a role in writing the draft Neuman gave Gore. A Word document on Hofeller’s computer contains similar language to what was eventually used in Neuman’s draft, the filing says. The Justice Department’s final letter requesting the citizenship question also appeared to have language that paralleled what Hofeller wrote in a 2015 study, the filing notes. That study analyzed the impact of using only the citizen voting-age population, not the total voting-age population, as the basis for redistricting, the filing notes.

The plaintiffs are asking the court to consider sanctions “or other appropriate relief” over the testimony from Gore and Neuman.

In a statement to NPR, Neuman said his testimony was “comprehensive and truthful.”

“My mother immigrated to this country from Central America,” he said. “Any inference that I would advocate actions that would harm the interests of the Latino community is wrong and offensive to me.”

This story has been updated throughout.