Governors of both parties had warned Congress for weeks that the Republican health care bill threatened to saddle their states with big costs and potentially leave millions of people without coverage, especially because of the cutbacks planned to Medicaid.
The bill's withdrawal on Friday left in place the status quo under the Affordable Care Act. That was welcomed by several governors in the states that opted to expand Medicaid under former President Barack Obama's law.
The Medicaid expansion has provided coverage for 11 million people in the 31 states that accepted it.
"I am pleased today's vote has been held as this bill would drastically affect the Commonwealth's ability to ensure essential care for thousands of people," Massachusetts Gov. Charlie Baker, a Republican in a Democratic-leaning state, said in a statement after the bill was pulled from consideration. "This version does not reflect the needs of states and does not contain many critical aspects of health care reform that our administration has communicated to the federal government."
Jerry Brown, California's Democratic governor, was fiery when he spoke in Washington, D.C., earlier in the week, calling the Republican measure "a dangerous bill." His state estimated annual costs of $6 billion starting in 2020, when the Medicaid changes would have hit.
In a Twitter message Friday, Brown said he was relieved the bill was withdrawn, adding: "The #ACA endures. But for tomorrow, we must gird ourselves for the battles yet to come."
Reducing the amount of federal money for Medicaid was the chief concern among governors because the state-federal program accounts for such a large share of most state budgets. People who lose their health coverage tend to show up in emergency rooms, where the cost for their care is expensive and often falls back on the state.
The bill would have ended Obama's Medicaid expansion and reduced future federal financing for the federal-state program.
Some states also were planning to make up funding for Planned Parenthood because the Republican bill would have blocked payments to the women's health group for a year.
The Congressional Budget Office estimated that the changes under the GOP bill would have increased the number of uninsured people across the U.S. by 14 million next year and 24 million by 2026. The nonpartisan office also said the plan would have reduced the federal budget deficit by $150 billion over a decade.
The nonpartisan Kaiser Family Foundation found in a study this week that trying to maintain the existing levels of Medicaid coverage would have been costly. It could have taken cuts equal to one-fourth of some state governments' education budgets to keep the coverage without raising taxes, the report found.
Estimates from officials in at least 17 states released this month backed up that proposition. States would have to decide between spending a lot more on Medicaid or reducing the services provided and the number of people covered.
An analysis by New Mexico insurance regulators estimated that the state's uninsured rate would double to 18 percent by 2026 if the Republican changes had been enacted. That would be close to the rate of people without insurance before the current law, commonly referred to as Obamacare, took effect, according to the analysis.
In Ohio, the state estimated that rolling back the Medicaid expansion entirely would have saved it $3.7 billion over a decade on Medicaid costs. Trying to maintain the program under the Republican plan would have cost $7.8 billion.
Ohio Gov. John Kasich and three other Republican governors - Arkansas' Asa Hutchinson, Nevada's Brian Sandoval and Michigan's Rick Snyder - wrote a letter to congressional leaders last week saying they wanted to undo Obama's Affordable Care Act but faulted the Republican replacement plan. They said it did not give states enough flexibility or provide the "resources necessary to make sure no one is left out."
All four states expanded Medicaid under the Affordable Care Act.
Kasich portrayed Friday's failure for the bill as a fresh start: "Now we have a chance to do it right," he said in a Twitter message.
Other Republicans, including Hutchinson and Wisconsin Gov. Scott Walker, said they don't want the issue to die - although Trump and congressional Republicans say they intend to move on to other parts of their agenda.
The demise of the Republican plan emboldened some of those seeking an expansion of the government's role in health care. New Jersey Assemblyman John Wisniewski, a Democrat running for governor, said Friday that he wants to ignite discussions on single-payer health care.
"I hope, with today's failure, Republicans will come to their senses and realize cutting benefits, increasing rates and giving massive tax cuts to the wealthy is not the basis for 'improving' healthcare," he said in a statement.
Associated Press reporters Scott Bauer in Madison, Wisconsin; Julie Carr Smyth in Columbus, Ohio; Andrew DeMillo in Little Rock, Arkansas; and Bob Salsberg in Boston contributed to this article.
Follow Geoff Mulvihill at http://www.twitter.com/geoffmulvihill