Texas is among the states that could lose congressional seats and federal funds if undocumented immigrants are excluded from crucial calculations.

The Supreme Court announced Friday that it will review President Donald Trump’s attempt to exclude undocumented immigrants when calculating how congressional seats are apportioned among the states.

The unprecedented proposal could have the effect of shifting both political power and billions of dollars in federal funds away from urban states with large immigrant populations and toward rural and more Republican interests.

“President Trump has repeatedly tried — and failed — to weaponize the census for his attacks on immigrant communities,” said Dale Ho, director of the American Civil Liberties Union’s Voting Rights Project, which is a party to the litigation.

A three-judge panel in New York said Trump’s July 21 memorandum on the matter was “an unlawful exercise of the authority granted to” him by Congress. It blocked the Commerce Department and the Census Bureau from including information about the number of undocumented immigrants — it is unclear how those numbers would be generated — in their reports to the president after this year’s census is completed.

The justices put the case on a fast track and said they will hold a hearing Nov. 30. By then, it probably will be a nine-member court again, if Judge Amy Coney Barrett is confirmed, giving the court a 6-to-3 conservative majority. The administration says timing matters because it must present the plan to Congress in January.

It is unclear whether the matter would divide the court along ideological lines, but the issue is another mark of how the once-­a-decade census has been transformed from a largely bureaucratic exercise into the centerpiece of a partisan battle.

The Supreme Court earlier this week agreed with the Trump administration that it could stop the count of Americans, despite fears that the novel coronavirus and other problems will lead to an undercount of people of color and those in hard-to-reach communities. Lower courts had said the count should continue until the end of the month. But that might have made it hard to get the information to Trump by year’s end — a timetable that carries additional importance in an election year.

In 2019, the justices rejected the Trump administration’s plan to add a citizenship question to the census form, which experts said would discourage participation by both legal and undocumented immigrants. Chief Justice John G. Roberts Jr. wrote the 5-to-4 decision, saying the administration did not follow proper procedure for introducing the question, and that its rationale was “contrived.”

“President Trump has repeatedly tried — and failed — to weaponize the census for his attacks on immigrant communities,” said Dale Ho, director of the American Civil Liberties Union’s Voting Rights Project, which is a party to the litigation. “The Supreme Court rejected his attempt last year and should do so again. The legal mandate is clear — every single person counts in the census, and every single person is represented in Congress.”

The latest controversy involves the constitutional mandate that apportionment of seats in the House of Representatives be based on the “whole number of persons in each State.” That has been interpreted to mean every resident, regardless of immigration status.

But this summer, Trump issued a memorandum that said, for the first time, “it is the policy of the United States to exclude from the apportionment base aliens who are not in a lawful immigration status.”

Trump’s memorandum indicated he believed that some states would be getting more congressional seats than deserved — California was implied but not named — because of their numbers of undocumented residents.

Trump directed Commerce Secretary Wilbur Ross to provide him with two sets of numbers, one that includes unauthorized immigrants and one that does not, “to the maximum extent feasible and consistent with the discretion delegated to the executive branch.”

Even the administration does not indicate how that would be accomplished, as the census does not ask about citizenship.

“The Census Bureau is still evaluating the extent to which, as a practical matter, administrative records pertaining to immigration status can be used to identify and exclude illegal aliens from the apportionment population count,” acting Solicitor General Jeffrey B. Wall said in a filing to the Supreme Court.

Still, Wall said, “there is ample historical and structural evidence supporting the president’s policy determination that the standard does not apply to all aliens living within a jurisdiction without the sovereign’s permission to settle there.”

A coalition of 22 states and the District of Columbia, 15 cities and counties, and the United States Conference of Mayors immediately challenged the memorandum, as did a number of nongovernmental organizations represented by the ACLU.

“The memorandum implements a policy that breaks with more than two hundred years of history and violates the plain text and purpose of both the Census Act and the Constitution,” New York Attorney General Letitia James said in a brief filed with the Supreme Court.

The challengers said in their brief that California, Texas and New Jersey would be likely losers if the entire population is not used in the calculations. Every 10 years, Congress is reapportioned because of the census, and a state’s delegation — and by extension its clout in the Electoral College — is determined.

States draw their own congressional district lines, and the new districts would debut in the 2022 congressional elections.

A special three-judge panel of federal judges in New York — two nominated by President George W. Bush and one by President Barack Obama — agreed with the challengers. They said in a lengthy but unsigned opinion that the question is “not particularly close or complicated” based on federal law.

“In short,” the judges wrote, “the secretary is required to report a single set of figures to the president — namely, the tabulation of total population by states under the decennial census — and the president is then required to use those same figures to determine apportionment using the method of equal proportions.”

They added, “Legislative history and settled practice confirm our conclusion that ‘persons in each state’ turns solely on residency, without regard for legal status.”

The Supreme Court is required to weigh in on decisions involving reapportionment, and it must either affirm or reverse the panel’s action.

But the administration will argue that deciding the case now is premature. Wall said it is only “speculative” at this point whether the states or the groups will be harmed. “It is still uncertain to what extent it will be ‘feasible’ for the executive branch to exclude illegal aliens from the apportionment base,” Wall wrote.

He said challenges must wait.

“After the secretary submits his report and any effects of the Memorandum on apportionment and funding have been determined, any injured parties may seek review, consistent with this court’s normal approach,” he wrote.

The case is Trump v. State of New York.