WASHINGTON - House Republicans made good on their years-long promise Thursday to pass a bill that would repeal and replace the Affordable Care Act, winning narrow passage of controversial legislation to unravel many of the law's popular consumer protections, do away with the individual mandate, and overhaul the insurance market.

â–ºMake it easy to keep up to date with more stories like this. Download the WFMY News 2 App now.

The final tally - 217 to 213 - reflected sharp divisions over the GOP's proposal, which is a long way from becoming law but still represents a huge victory for House Republican leaders and the Trump administration. The GOP has struggled for months to cobble together legislation that would garner the required 216 votes from its own members.

"This bill delivers on the promises that we have made to the American people," said House Speaker Paul Ryan, R-Wis., at the end of an impassioned floor debate. "A lot of us have been waiting seven years to cast this vote … (and) to rescue people from this collapsing law."

He and other Republicans said the GOP plan would increase competition, lower costs, and return power to the states and to individuals. Keeping Obamacare in place, Ryan said, would mean "even higher premiums, even fewer choices, even more insurance companies pulling out" of the individual market.

Democrats fiercely attacked the GOP plan, saying it would gut consumer protections, increase health care costs, and strip health insurance from the poor and middle class.

"Trumpcare eviscerates essential health benefits," such as maternity care and prescription drug coverage, said House Democratic Leader Nancy Pelosi, D-Calif., "... and guts protections for people with pre-existing conditions."

The bill will now go to the Senate, where Republicans are already split over the measure and Democrats are unified in opposition. Republicans hold a narrow 52-seat majority in the chamber, and they will consider the bill under special budget rules that prevent a filibuster.