WASHINGTON - Congress ended its chaotic year on a surprising note of bipartisan unity Friday, overwhelmingly approving a massive 2016 tax and spending package and sending it to President Obama, who promptly signed it.

Obama welcomed the sprawling legislation, a rare compromise product of the divided government. It includes something for nearly everyone, from parents and teachers to Big Oil and small business, from 9/11 first responders to cybersecurity hawks and more.

"There's some things in there that I don't like, but that's the nature of legislation and compromise, and I think the system worked," Obama said at his year-end news conference before traveling with his family on their annual vacation to Hawaii. "It was a good win."

The legislation pairs two huge bills: a $1.14 trillion governmentwide spending measure to fund every cabinet agency through September, and a $680 billion tax package extending dozens of breaks touching all sectors of the economy, making several of them permanent and tossing the entire cost onto the deficit.

Republicans and Democrats joined to approve the spending bill on a resounding 316-113 vote in the House, a day after passing the tax bill. The unexpectedly large margin was a victory for new Speaker Paul Ryan, who saw a majority of his GOP lawmakers back the legislation despite complaints by frustrated conservatives whose priorities were ignored.

Not long after, the Senate voted 65-33 to send the entire package to Obama's desk, and lawmakers began rushing to catch flights back home with Congress adjourning until January.

On Capitol Hill, it was a harmonious conclusion to a wild 2015 that was driven largely by tea party lawmakers pushing for showdowns with Obama on immigration, Planned Parenthood, and the president's health law. They never achieved their principal goals even with the Senate newly under GOP control, but along the way they forced out Ryan's predecessor, John A. Boehner, and nearly shut down the Homeland Security Department.

On Friday, several hard-liners expressed disappointment over a year that ended with passage of a spending bill funding many of Obama' priorities while excluding their own, including curbs on Syrian refugee resettlement in the U.S.

"The product we're delivering this year is awful," groused GOP Rep. Dave Brat of Virginia.

Several of the GOP presidential candidates in the Senate were among those opposing the legislation, though Sen. Marco Rubio of Florida didn't show up to vote. Sens. Ted Cruz of Texas and Rand Paul of Kentucky voted "no."

Yet few conservatives were complaining about Ryan himself, and many lawmakers, Republicans and Democrats alike, proudly touted the accomplishments achieved since the new speaker was sworn in, including bipartisan bills on highways and education and a two-year budget and debt deal that paved the way for Friday's legislation.

"Truly historic," Senate Majority Leader Mitch McConnell (R., Ky.) boasted on the Senate floor as he and Congress' other top leaders of both parties took turns taking credit for the holiday-season largesse.

Ryan himself told reporters he fielded a congratulatory call from Obama who thanked him for keeping government working and invited him to dinner at the White House in the new year.

The Democratic leaders, Nancy Pelosi of California in the House and Harry Reid of Nevada in the Senate, complained about a provision lifting the four-decade-old ban on exporting crude oil and the legislation's failure to address Puerto Rico's fiscal woes, which Ryan pledged to tackle next year instead.

But they boasted of using their leverage, veto threats from Obama and the GOP's craving for the oil export ban to extract numerous concessions from Republicans, including five-year extensions of solar and wind tax credits, a top goal for Reid. And they blocked numerous policy "riders" Republicans sought on the environment and other issues.

"They wanted big oil so much that they gave away the store," Pelosi gloated.

Details of the 2016 U.S. Budget Passed Friday

Some key aspects of the massive 2016 tax and spending package signed by President Obama.

Taxes

Family tax credits. Permanently extends recent changes to the $1,000 child tax-credit that make it refundable to families with little tax liability; makes permanent a $2,500 college tuition tax credit and a more generous credit for low-income working families.

Sales tax deduction. Permanently extends a deduction of state and local sales taxes in states without an income tax.

Business tax breaks. Permanently extends several business tax breaks, including the research and development credit and a deduction for small business equipment purchases. Extends tax breaks for energy produced from renewable sources such as solar, wind and geothermal energy and tax breaks for biodiesel fuels and electric cars and motorcycles.

Spending

Provides $1.15 trillion to fund the daily operating budgets of cabinet agencies through Sept. 30, 2016, including $607 billion for defense, which contains $59 billion for overseas military operations. Nondefense programs would receive $543 billion. The Departments of Justice, Veterans Affairs and Defense won generous increases, as did NASA.

Health-care law

Delays for two years the scheduled 2018 implementation of a "Cadillac tax" on more generous health insurance plans; imposes a two-year pause in a 2.3 percent tax on medical devices and a one-year delay in a tax on health insurance providers.

Blocks funds for "risk corridors" in which the government provides relief to health insurers with deep losses.

Add-ons

Repeals the four-decade ban on exports of U.S. crude oil.

Reauthorizes national intelligence programs.

Tightens several security requirements of the visa waiver program, which allows citizens of 38 countries to travel to the U.S. without visas. A key element would deny visa waivers to those who have traveled to countries such as Syria and Iraq in the last five years.

Includes cybersecurity legislation that would encourage companies to share cyberthreat information with the government.

Extends a program championed by the New York delegation that provides health care and disability payments to 9/11 first responders who worked in the toxic ruins of the World Trade Center. Adds a new compensation fund for victims of state-sponsored terrorism.

Reauthorizes the Land and Water Conservation Fund, which devotes fees from offshore oil and gas production to create national parks, purchase buffers zones around rivers and lakes, and provide matching grants for state and local projects. - APEndText