Washington (CNN) -- The House of Representatives on Saturday night passed a sweeping health care bill by a vote of 220-215.

With the passage of H.R. 3962, the Affordable Health Care for America Act, proponents of health care reform took an important step forward, but turning the bill into law remains uncertain.

It's unclear when the Senate will vote on a version of the health care legislation debated in that chamber. If the Senate passes its bill, the House and Senate bills would have to be reconciled into one document and voted on again.

The House Democrats needed 218 votes to ensure passage of the bill. On Saturday, it appeared the vote would come down to the wire, as the intentions of some conservative Democrats remained unknown.

In the final tally, 219 Democrats voted for the legislation, and 39 voted against it.

Rep. Joe Cao (R-Louisiana) was the only Republican who voted in favor of the bill.

Read the House bill (PDF)

Democrats began counting down with eight seconds left in the voting period and erupted in a loud cheer when the hotly debated legislation was passed. Republicans in the chamber stood across the floor, some with their arms folded.

"Oh what a night," said House Speaker Nancy Pelosi in a news conference after the House adjourned its session for the night. She thanked President Obama and her colleagues who fought to get the bill passed.

The Republican National Committee released a statement after the vote.

"Today with help from their liberal House allies, President Obama and Nancy Pelosi finally got what they have been creating behind closed doors these past months -- a government-run health careexperiment that will increase families' health care costs, increase the deficit, increase taxes on small businesses and the middle class, and cut Medicare," the statement said.

Earlier, the House passed an amendment to pending health care legislation that prohibits federal funds for abortion services in the public option and in the insurance "exchange" the bill would create.

The vote passed 240-194.

Share your thoughts on the health care debate

A second amendment considered by the House, introduced by Minority Leader John Boehner, which would have substituted several sections of the health care bill dealing with insurance, did not pass. Legislators voted against the amendment 258-176.

The first amendment, introduced by anti-abortion Democrats, bans federal funds for abortion services in the public option and in the insurance "exchange" the bill would create. Its consideration was considered a big win for them and for the U.S. Conference of Catholic Bishops, which used its power -- especially with conservative Democrats in swing congressional districts -- to help force other Democratic leaders to permit a vote that most of them oppose.

The prohibition, introduced by Democratic members, including Rep. Brad Ellsworth, D-Indiana, and Rep. Bart Stupak, D-Michigan, would exclude cases of rape, incest or if the mother's life is in danger.

Republicans strongly supported the measure.

The GOP accounted for 174 of the votes in favor of the amendment, with 1 Republican voting "present." On the Democrats' side, 64 voted for the measure, and 194 voted against.

Earlier Saturday, President Obama said members of the House of Representatives face the chance of a lifetime as they consider the legislation.

After a meeting with the House Democratic leadership, the president said he told lawmakers that "opportunities like this come around maybe once in a generation."

"This is their moment, this is our moment, to live up to the trust that the American people have placed in us," Obama told reporters in the White House rose garden. "Even when it's hard, especially when it's hard, this is our moment to deliver."

CNN's Dana Bash, Elaine Quijano, Lisa Desjardins, Alan Silverleib, Paul Steinhauser and Deirdre Walsh contributed to this report.