The AARP called the health bill that House Republicans narrowly approved Thursday “deeply flawed” because it would weaken Medicare and lead to higher insurance premiums for older Americans.

The American Medical Association said it would undo health insurance coverage gains and hurt public health efforts to fight disease. The American Hospital Association said the bill would destroy Medicaid, the state-federal health insurance program for the poor that expanded mightily under the Affordable Care Act and buoyed hospitals’ bottom lines.

Normally, that would spell failure.

But in today’s Washington, despite vocal opposition from nearly every major constituency affected by the bill, the vote produced the opposite result. The chorus of nays was not enough to stop the Republican-controlled House from approving the American Health Care Act, which repeals many critical parts of Affordable Care Act — the 2010 law known as Obamacare that has dropped uninsured rates in the United States to historic lows but, despite its lofty name, did little to rein in rising health costs. The AHCA will now move to the Senate, where GOP senators are expected to demand many changes.

Republicans have promised to repeal Obamacare since the day it was passed with only Democrats voting for it and have been campaigning on that promise ever since. While the House voted to repeal the act more than 60 times under the Obama administration, Thursday’s vote was the first one that really counted because the GOP controls Congress and the White House.

Peter Kongstvedt, a Virginia health industry consultant, said some House Republicans are likely betting the Senate blocks their legislation from going forward. “Nobody wins with this vote — that’s the damnedest part,” he said. “It’s a shallow political statement.”

The vote was about health care, but it was a display of political theater, too. Representatives sent a message not to hospitals, doctors and patients but to President Donald Trump and his devoted followers who propelled the GOP to power.

“The president needed a win and so does House Speaker Paul Ryan,” said Jason Fichtner, a health care expert at the conservative Mercatus Center at George Mason University in Fairfax, Va. “With this vote, they can go back to their constituents and say they did something about Obamacare.”

That is, the 217 GOP House members who voted for the bill. Twenty voted no, joining 193 Democrats.

Trump’s team scored him a touchdown, but their run to the goal line wasn’t politically pretty:

The bill passed without an updated analysis of costs and benefits from the nonpartisan Congressional Budget Office, whose review in March came before the GOP added sweeteners to win over its conservatives and moderates.

Democrats passed Obamacare after a year of debate. The GOP spent almost two months hammering out its replacement plan.

Business groups — such as the drug and hospital industries — played no part in shaping the AHCA. The Obama administration got both groups on board early on.

The GOP’s focus was not so much on what can lower prices and increase health coverage but how to persuade the right-wing Freedom Caucus to back the legislation.

In the end, passage mattered less about how the bill played in public polls — poorly — or among key interest groups — nearly all opposed. “Coming to agreement and avoiding the embarrassment of not coming to agreement was more important than what was in the final bill,” said Jim Morone, a political scientist at Brown University in Rhode Island. “Republicans have become a deeply ideological party … and they don’t care what interest groups think; they are going to press ahead.”

Part of the unlikely victory is that the bill makes the biggest change to Medicaid since the program was established in 1965 and there hasn’t been as much debate about that as one might expect. The AHCA could lead to huge cuts in federal funding of Medicaid, which now covers more than 75 million Americans.

Alan Levine, a hospital executive who was the top health official under former Republican governors Jeb Bush in Florida and Bobby Jindal in Louisiana, said Republicans who ran on repealing Obamacare felt they had no choice but to vote for the bill, despite its flaws. “I don’t think Republicans can face voters in 2018 and have a credible argument to keep them in control of Congress, if they did not do their No. 1 campaign priority to repeal Obamacare,” said Levine, CEO of Mountain States Health Alliance, a hospital system in Johnson City, Tenn.

Besides, he said, even if the GOP bill becomes law, it’s set up so that the changes won’t affect many people before the 2018 midterm elections. “People won’t feel this — good or bad — until well after the election.”