WASHINGTON—Legislation to negate a fiscal cliff of across-the-board tax increases and sweeping spending cuts to the Pentagon and domestic agencies is headed to the House.

The Senate approved the bill in an early-morning, 89-8 vote, capping a New Year's Eve drama unlike any other in the annals of Congress.

The White House-backed legislation would prevent middle-class taxes from rising, and raise rates on incomes over $400,000 for individuals and $450,000 for couples.

The measure ensures that lawmakers will have to revisit difficult budget questions in coming weeks as relief from painful spending cuts expires and the government requires an increase in its borrowing cap.

House Speaker John Boehner pointedly refrained from endorsing the agreement, though he's promised a vote on it or a GOP alternative right away.