As President Trump and Republicans in the U.S. House of Representatives celebrated the passage of a bill to repeal and replace the Affordable Care Act on Thursday, key aspects of the legislation continued to stir fiscal uncertainty for state and local governments.

The American Health Care Act made it through the House by a narrow margin of 217-213, with no Democratic votes. It is likely to undergo significant modifications in the Senate. In the current iteration of the bill, the provisions with the greatest financial implications for states deal with Medicaid, which provides access to health care coverage for low-income and disabled Americans.

In a statement released on Thursday, Fitch Ratings, the credit ratings agency, described the plan as a “fundamental restructuring of the more than 50-year-old program.”

Medicaid represents roughly one-third of state budgets. The rolling back of the program under the GOP bill would restrict the amount of federal Medicaid funding flowing into states.

According to Congressional Budget Office estimates based on the original draft of the AHCA, the GOP plan will cut federal spending on Medicaid by as much as $880 billion over the next decade. In their own analysis, Fitch estimates that $370 billion of those savings are being achieved by converting the Medicaid program to a per-capita cap funding mechanism.

Under this aspect of the plan, Medicaid funding to states, which as of now is open-ended and fluctuates based on factors like the cost of care, would be limited to a set amount per enrollee.

A base year amount of per-enrollee funding would be determined for each state, and that amount would increase at a fixed rate over time. Although the funding a state receives would go up as enrollment increases, this system does not provide for the possibility that health care costs may rise faster than the established fixed rate.

The Jan. 1, 2020 implementation date for per-capita cap provision gives state governments time to plan for these changes. And Fitch estimates that states will be able to make “material, but not impossible” budget adjustments to compensate.

But the ratings agency also noted that “imposing capped federal spending shifts the risks for higher costs, whether due to new treatment regimes, health emergencies, or other events, away from the federal government and to states, providers, and enrollees.”

States that chose to take advantage of the Medicaid expansion under the Affordable Care Act, will be the most financially exposed. Fitch estimates these state governments stand to lose as much as $510 billion due to the reduced federal matching rate.

According to analysis by the U.S. Department of Health and Human Services, as many as 9.1 million people received coverage under state Medicaid expansions in fiscal year 2015. And, starting in 2020, states that expanded will have to decide whether they will continue to offer access to people who become newly eligible, even as the federal government offers a significantly lower matching rate, or if they will choose to leave those people uninsured.

The GOP chose to vote on the AHCA before the Congressional Budget Office was able to offer their revised cost and coverage estimates, even though lawmakers made changes to the bill that could potentially alter earlier estimates.

Following Thursday’s vote, several state and local officials issued statements expressing their concerns.

“I am disappointed by today’s vote as this bill would significantly reduce critical funds for the Commonwealth’s health care system,” said Massachusetts Gov. Charlie Baker, a Republican.

New York Gov. Andrew Cuomo, a Democrat, lashed out at the bill.

"Ultraconservatives in Washington have pushed through the House an unconscionable piece of legislation that threatens to tear apart our health care system,” he said in a statement.

New York’s state finances would be particularly hard-hit by the AHCA, thanks to an amendment that shifts Medicaid costs from counties to the state government.

The National League of Cities rejected the way the AHCA stands to impact public health spending at the local level.

“Congress cannot promise to fix the American health care system and stick the bill on local governments,” the NLC said in a statement, pointing specifically to areas like drug addiction and mental health counseling that would be threatened if Medicaid funding is decreased.

New Orleans Mayor Mitch Landrieu, a Democrat, who is the vice president of the U.S. Conference of Mayors, said it “should scare every American that Congress doesn’t know how many people this bill will hurt or what it costs.”

He noted that the Medicaid expansion in Louisiana provides coverage to more than 420,000 residents, nearly one out of every 10 people in the state.

In remarks delivered Thursday in the White House Rose Garden, Trump expressed nothing but confidence in the future of the health care bill. “Most importantly, yes, premiums will be coming down,” the president said. “Yes, deductibles will be coming down.”

“But very importantly, it’s a great plan,” he added, “and ultimately, that’s what it’s all about.”