The House of Representatives voted by a razor-thin 217-213 to pass Republicans’ revised Obamacare replacement bill and move it to the Senate, where more changes are expected.

House Speaker Paul Ryan needed 216 votes to pass the legislation, and 20 GOP members voted no Thursday along with all 193 Democrats.

Immediately after the roll call vote concluded around 2:30 p.m., House Republicans began boarding buses to head to a celebratory event at the White House.

The 20 Republican House members who voted no included Andy Biggs of Arizona, Mike Coffman of Colorado, Barbara Comstock of Virginia, Ryan Costello of Pennsylvania, Charlie Dent of Pennsylvania, Dan Donovan of New York, Brian Fitzpatrick of Pennsylvania, Jamie Herrera Beutler of Washington, Will Hurd of Texas, and Walter Jones of North Carolina.

The other GOP members voting no were David Joyce of Ohio, John Katko of New York, Leonard Lance of New Jersey, Frank LoBiondo of New Jersey, Thomas Massie of Kentucky,  Patrick Meehan of Pennsylvania, Dave Reichert of Washington,  Ileana Ros-Lehtinen of Florida, Chris Smith of New Jersey, and Mike Turner of Ohio.

The legislation, called the American Health Care Act, has been a point of contention on Capitol Hill since Ryan, R-Wis., pulled the bill March 24 when it became clear Republicans did not have enough votes to pass it.

The House Freedom Caucus, a group of conservative lawmakers, originally opposed the bill but now supports it with the addition of the so-called MacArthur amendment negotiated by Freedom Caucus Chairman Mark Meadows, R-N.C., and Tuesday Group Co-chairman Tom MacArthur, R-N.J.

“The MacArthur amendment will grant states the ability to repeal cost-driving aspects of Obamacare left in place under the original [American Health Care Act],” the Freedom Caucus said in a formal statement. “While the revised version still does not fully repeal Obamacare, we are prepared to support it to keep our promise to the American people to lower health care costs.”

The revisions also include a provision on coverage for Americans with preexisting conditions.

Reps. Fred Upton, R-Mich., and Billy Long, R-Mo., worked with President Donald Trump on Wednesday to secure a new amendment that provides $8 billion more in federal funding over five years to help cover individuals with preexisting conditions.

The Wall Street Journal tweeted the names of the 20 Republicans who voted no:

“While it’s not full repeal, I’ve said this many times, it’s what we believe is the best piece of legislation we can get out of the House at this moment,” Rep. Jim Jordan, R-Ohio, told reporters Wednesday at Conversations With Conservatives, a monthly gathering on Capitol Hill.

The bill includes provisions to repeal Obamacare subsidies and replace them with age-based, refundable tax credits to help consumers get coverage in the individual market, and to  repeal the Obamacare mandate that forced consumers to get health insurance or pay a penalty.

The legislation allows states to choose waivers to bypass Obamacare’s community-rating rules, which block insurers from charging sick consumers more than healthy consumers.  States that do so may charge sick customers more only if they don’t maintain continuous coverage.

Before the vote, House Minority Leader Nancy Pelosi, D-Calif., railed on the House floor against the “moral monstrosity” she called Trumpcare. Ryan, when he spoke, depicted the legislation as beginning to keep a promise to voters.

Senate Minority Leader Chuck Schumer, D-N.Y., tweeted his opposition shortly before the House vote.

Melanie Israel, a research associate at The Heritage Foundation, praised the bill’s pro-life provisions, one of which ensures that tax dollars will not go to the abortion industry and also defunds Planned Parenthood for one year.

“The American Health Care Act addresses pro-life concerns regarding Planned Parenthood funding and abortion coverage in health plans,” Israel told The Daily Signal in an email, adding:

These important restrictions would protect tax dollars from entanglement with the abortion industry and help allow individuals and families to choose health care that meets their needs without violating their beliefs or subsidizing life-ending drugs and procedures.

Melissa Quinn and Ken McIntyre contributed to this report.