WASHINGTON — House Republicans dropped 11th-hour objections and cleared a path for final passage Tuesday night of a measure that will let taxes rise for the richest Americans but not the middle class, extend emergency unemployment benefits and end Washington’s long drama over the “fiscal cliff.”

In addition to avoiding the major tax increases and government spending cuts that had been scheduled to take effect with the new year, the deal will also delay planned domestic and military spending cuts for two months and maintain a variety of business tax breaks (such as one for wind-energy production). It prevents a cut in fees for doctors who treat Medicare patients, and cancels a $900 pay increase due to lawmakers in March. Another provision is designed to prevent a spike in milk prices.

The House vote of 257 to 167 passed legislation the Senate approved Monday. It came after a wild day in which the critical measure was thought for several hours to be headed for defeat.

Eighty-five Republicans and 172 Democrats voted in favor of the deal, while 151 Republicans and 16 Democrats opposed it. Every member of Washington’s congressional delegation voted for the bill, except Democrats Jim McDermott and Adam Smith.

“The one thing that I think, hopefully, the new year will focus on,” President Obama said at the White House, “is seeing if we can put a package like this together with a little bit less drama, a little less brinkmanship, and not scare the heck out of folks quite as much.”

Immediately after talking to reporters, Obama left the White House to fly back to Hawaii, resuming the vacation he suspended to return to budget talks.

The measure would let the top tax rate rise immediately from 35 to 39.6 percent on income over $450,000 for married couples and $400,000 for single people — the first broad tax increase in two decades and the first since 1990 to pass Congress with Republican support.

The measure would protect more than 100 million families earning less than $250,000 a year from significant income-tax increases set to take effect this month — although payroll taxes will rise for most households with the end of a temporary tax cut approved two years ago.

The nonpartisan Congressional Budget Office says the measure would cause the national debt to be $4 trillion higher by 2022 than if all the cliff’s tax hikes and spending cuts had come to pass.

After weeks of bickering over whether taxes should rise for anyone, the compromise bill rolled through the Senate in a highly unusual vote early on Tuesday morning. The measure was approved 89 to 8, with both parties offering overwhelming support.

Three Senate Democrats voted against the measure: Tom Harkin of Iowa, Thomas Carper of Delaware and Michael Bennet of Colorado. Bennet said the bill would do little to reduce record budget deficits.

Five Senate Republicans also rejected the measure, including tea-party favorites Rand Paul of Kentucky, Mike Lee of Utah and Marco Rubio of Florida, a potential contender for the 2016 Republican presidential nomination. But 40 others voted for it.

House Democrats largely embraced the measure, which was negotiated by Vice President Joe Biden and Senate Minority Leader Mitch McConnell, R-Ky., and endorsed by Obama.

“It’s long overdue for us to have this solution to go forward and remove all doubt as to what comes next for our country,” House Minority Leader Nancy Pelosi, D-Calif., said after Biden briefed House Democrats on the contents of the bill.

Among House Republicans, however, the measure at first appeared to run into strong opposition. The GOP held two briefings for its members on the bill.

After the first, Majority Leader Eric Cantor, R-Va., emerged to announce his opposition.

“We should not take a package put together by a bunch of sleep-deprived octogenarians on New Year’s Eve,” said Rep. Steven LaTourette, R-Ohio, an ally of Speaker John Boehner.