WASHINGTON — Summoned to success by President Obama, the Democratic-controlled Congress approved historic legislation Sunday night extending health care to tens of millions of uninsured Americans and cracking down on insurance company abuses, a climactic chapter in the century-long quest for nearly universal coverage.

“This is what change looks like,” Obama said a few moments later in televised remarks that stirred memories of his 2008 campaign promise of “change we can believe in.”

Widely viewed as dead two months ago, the Senate-passed bill cleared the House on a 219-212 vote. Republicans were unanimous in opposition, joined by 34 dissident Democrats.

Obama watched the vote in the White House’s Roosevelt Room with Vice President Joe Biden and about 40 staff aides. When the long sought 216th vote came in — the magic number needed for passage — the room burst into applause and hugs. An exultant president exchanged a high-five with his chief of staff, Rahm Emanuel.

A second, smaller measure — making changes in the first — cleared the House shortly before midnight and was sent to the Senate, where Democratic leaders said they had the votes necessary to pass it quickly. The vote was 220-211.

Maine Reps. Mike Michaud and Chellie Pingree, both Democrats, voted in favor of the bill.

The nonpartisan Congressional Budget Office said the legislation awaiting the president’s approval would extend coverage to 32 million Americans who lack it, ban insurers from denying coverage on the basis of pre-existing medical conditions and cut deficits by an estimated $138 billion over a decade. If realized, the expansion of coverage would include 95 percent of all eligible individuals under age 65.

For the first time, most Americans would be required to purchase insurance, and face penalties if they refused. Much of the money in the bill would be devoted to subsidies to help families at incomes of up to $88,000 a year pay their premiums.

Far beyond the political ramifications were the sweeping changes the bill held in store for millions of individuals, the insurance companies that would come under tougher control and the health care providers, many of whom would face higher taxes.

Across hours of debate, House Democrats predicted the larger of the two bills, costing $940 billion over a decade, would rank with other great social legislation of recent decades.

“We will be joining those who established Social Security, Medicare and now, tonight, health care for all Americans, said Speaker Nancy Pelosi, partner to Obama and Senate Majority Leader Harry Reid, D-Nev., in the grueling campaign to pass the legislation.

Republicans readily agreed the bill would affect everyone in America but warned repeatedly of the burden imposed by more than $900 billion in tax increases and Medicare cuts combined.

“We have failed to listen to America,” said Rep. John Boehner of Ohio, leader of a party that has vowed to carry the fight into the fall’s midterm elections for control of Congress.

The final obstacle to the bill’s passage was cleared at mid-afternoon when Obama and Democratic leaders reached a compromise with anti-abortion lawmakers. The White House announced he’d issue an executive order pledging that no federal funds would be used for elective abortion, satisfying Michigan Rep. Bart Stupak and a handful of like-minded lawmakers.

Republican abortion foes said Obama’s proposal was insufficient, and when Stupak sought to counter them, a shout of “baby killer” could be heard from the GOP side of the chamber.

The measure would also usher in a major expansion of Medicaid, the federal-state health care program for the poor. Coverage would be required for incomes up to 133 percent of the federal poverty level, $29,327 a year for a family of four. Childless adults would be covered for the first time, starting in 2014.

The insurance industry, which spent millions on ads trying to block the bill, would face new regulation. Insurers would be barred from placing lifetime dollar limits on policies, from denying coverage to children because of pre-existing conditions and from canceling policies when a policyholder becomes ill.

A new high-risk pool would offer coverage to uninsured people with medical problems until 2014, when the coverage expansion would go into high gear.

To pay for the changes, the legislation includes more than $400 billion in higher taxes over a decade, roughly half of it from a new Medicare payroll tax on individuals with incomes over $200,000 and couples over $250,000. An excise tax on high-cost insurance policies was significantly scaled back after complaints from organized labor.