With the U.S. Supreme Court expected to soon decide whether the Trump administration can ask about citizenship in the upcoming census, new evidence emerged Thursday suggesting the question had been tacked on to advance Republican gerrymandering.

And Texas — more specifically, an analysis of the state House’s 150 districts — was at the center of it.

Opponents of the citizenship question submitted a federal court filing with documents that showed Thomas B. Hofeller, a longtime Republican redistricting strategist, played a key role in coming up with the rationale the Trump administration has used to defend the addition of the question — that citizenship data is necessary to better enforce the federal Voting Rights Act.

The filing includes a 2015 analysis by Hofeller that had been commissioned to demonstrate the effect that using the population of citizens who are of voting age, as opposed to total population, would have on drawing up legislative districts.

Hofeller detailed how the change would clearly be “advantageous to Republicans and Non-Hispanic Whites” by using the Texas House as his case study. He detailed how the Hispanic population would drop in traditionally Democratic districts, which would then have to grow geographically to meet constitutional population requirements in redistricting.

The loss of Democratic-leaning districts would be most severe in areas with mostly Hispanic populations, such as South Texas, El Paso and the Rio Grande Valley, which would lose 2.6 state House districts, according to Hofeller’s analysis. The change would also cost Dallas County 1.7 districts and another 1.7 districts in Harris County and its suburbs.

If the Supreme Court had required such a change at the time of the study, it would have mandated a “radical redrawing of the state House districts,” Hofeller wrote. He noted that the traditionally Democratic districts in need of more population could pick up pockets of Democratic areas in adjacent Republican-held districts and ultimately shore up the GOP’s control across the state.

But that approach was unrealistic at that point, Hofeller wrote in his study, because the government did not compile the necessary citizenship information. And he admitted it was unlikely that the Supreme Court could be convinced to alter the population standard used to draw legislative districts.

“Without a question on citizenship being included on the 2020 Decennial Census questionnaire, the use of citizen voting age population is functionally unworkable,” Hofeller said.

Years later, Hofeller "ghostwrote" part of the U.S. Department of Justice letter that has been used as justification for adding the citizenship question and in which officials laid out the Voting Rights Act rationale, lawyers in the census case told the court.

The evidence came to light more than a month after the Trump administration defended the addition of the question before the Supreme Court, arguing it was a legitimate effort at obtaining more accurate citizenship information even if it led to an undercount among immigrants and people of color. The administration’s legal foes — scores of states, municipalities, community groups and legislative caucuses — have argued that such an undercount would be unconstitutional.

The high court is expected to rule on the legality of the question this summer.

The addition of the question could go a long way in hampering the electoral and financial future of Texas, long considered a hard-to-count state, because the census determines everything from political boundaries to how much funding the state gets from the federal government.

Demographers and experts have warned that the inclusion of the citizenship question would depress response rates among Texas Hispanics, immigrants and their families even if they’re authorized to live in the country.