Congress went home for the year on Dec. 18, right before passing a $1.1 trillion last-minute spending package. Here's what both sides compromised in the deal. (Deirdra O'Regan/The Washington Post)

Congress left for the year on Friday after clearing a year-end spending and tax deal that leaders heralded as a bipartisan achievement that could serve as a harbinger of a more functional Congress next year.

While members of both parties grumbled about what made it into the legislation and what was held out, the agreement unveiled earlier this week easily passed both chambers.

Leaders in both parties said they are optimistic that next year Congress can handle its basic responsibilities, such as funding the government, without the drama and tension that have defined the institution in recent years.

“One thing I think we’re set up to accomplish next year that hasn’t been done in 20 years is passing each of the appropriations bills,” Senate Majority Leader Mitch McConnell (R-Ky.) said on Friday following the votes. “The whole appropriations process has not functioned like it should in 20 years under majorities of both parties.”

[Sign up for The Daily 202 for more coverage of Congress and campaign news]

Early Friday morning the House passed a $1.1 trillion spending bill on a 316 to 113 vote, with 150 Republicans and 166 Democrats supporting the measure, after passing a $622 billion tax measure Thursday on a 318 to 109 vote. Both pieces of legislation were the result of bipartisan year-end negotiations.

The Senate soon after passed both parts of the agreement on a 65 to 33 vote. President Obama is expected to sign the legislation into law. President Obama signed the legislation on Friday afternoon.

[Here’s what made it into Congress’s big spending and tax bills]

There was concern until earlier this morning that there would not be enough support for the spending bill in the House, but last minute lobbying efforts by leadership secured far more than the needed votes.

Heading into Friday, House Democrats were wary of the $1.1 trillion appropriations package because it would lift a ban on crude oil exports that has been in place for 40 years, while many Republicans said it allows for too much spending and doesn’t do enough on issues such as immigration and abortion.

The strong vote tally in the face of these concerns is a victory for new House Speaker Paul D. Ryan (R-Wis.), whose allies pushed their reluctant GOP colleagues to vote for the bill arguing it would strengthen their new leader’s ability to negotiate deals next year.

“He’s going to be our chief negotiator, we’re going to have other deals,” Rep. Tom Cole (R-Okla.), a member of the whip team and the Appropriations Committee said Thursday. “Divided government dictates that so we want him to have as strong a hand as he possibly can.”

The question now is how long Ryan’s honeymoon period with the House GOP conference will last and whether he has simply been given a pass on the year-end bill because it was the result of a broader budget deal hammered out by his predecessor Speaker John A. Boehner (R-Ohio) before he resigned in October.

Members have stressed they appreciate that Ryan’s leadership style has been more inclusive, but conservatives also made clear they weren’t happy with the contents of the year-end deal.

House Freedom Caucus member Tim Huelskamp (R-Kan.) said both bills are loaded with special interest handouts and spending increases that will only fuel the anti-establishment wing of the Republican party.

“It’s an early Christmas present for Donald Trump,” Huelskamp said. “This is just more of the same era of bad deals in Washington.”

[Paul Ryan notches a big victory, but the true test may come next year]

On the campaign trail, most Republican presidential candidates panned the legislation. Sens. Ted Cruz (R-Texas) and Rand Paul (R-Ky.) voted against the bill while Lindsey Graham (R-S.C.) voted for the package. Sen. Marco Rubio (R-Fla.) missed the vote. Democratic presidential nominee Sen. Bernie Sanders (I-Vt.) also voted against the bill.

“If anyone needed more evidence of why the American people are suffering at the hands of their own government, look no further than the budget deal announced by Speaker Ryan,” Trump, the GOP front-runner, said in a statement Thursday. “In order to avoid a government shutdown, a cowardly threat from an incompetent President, the elected Republicans in Congress threw in the towel and showed absolutely no budget discipline.”

Budget watchdog groups have been critical of the tax bill, in particular, arguing it’s a deficit buster.

“In typical Washington fashion, Congress has added nearly a trillion to the debt, declared victory and is going home,” Maya MacGuineas, president of the
Committee for a Responsible Federal Budget said in a release.

There is little chance Congress will attempt to enact any sweeping policy changes during the 2016 election year and McConnell said he would continue to focus on moving legislation that has some bipartisan support, while acknowledging some political points would be made.

“We want to continue to be the kind of Senate we were this year,” he said. “Focusing on things that could be achieved, and turned into a law, and I’ve listed a number of them. But from time to time we will also point out the differences, and we did that at least on four occasions this year,” noting bills to repeal the president’s signature health care law and reverse his environmental policies.

Two contentious issues left out of the omnibus that will come up again early next year are whether to crackdown on Syrian and Iraqi refugees trying to enter the country and how to help Puerto Rico with its debt crisis.

Following the Paris terror attacks, the House passed legislation that would prevent Iraqi and Syrian refugees from coming to the United States until the administration took steps to assure Congress the program is not being used as a gateway for terrorists. Conservatives pushed to have this language included in the spending bill, but it was held out after the White House and Democratic leaders balked at the idea.

Now, McConnell has committed to House Republicans that he will bring the House bill up for debate in the Senate.

[Syrian refugee restrictions may not be in the budget package, but GOP fight continues]

Democrats pushed to have aid for Puerto Rico, which is struggling to pay its debts, in the year-end deal, but Republicans refused. To help secure the needed votes for the spending bill, however, Ryan this week tasked the relevant committee chairmen with producing a plan for helping Puerto Rico by the end of March. It’s unclear what that will mean, Puerto Rico’s government and Democrats want to give the island territory access to the bankruptcy system, but many Republicans oppose that option.

House Minority Leader Nancy Pelosi (D-Calif.) said ahead of the vote that she expects the House to begin holding hearings when Congress returns on Jan. 11.

Ryan “wanted to go through committee on it,” Pelosi said. “First day back he said there would be hearings on the crisis in Puerto Rico.”

[Congress might actually do something about Puerto Rico’s debt crisis next year]

Pelosi on Friday also once again demonstrated her ability to deliver Democratic votes when needed and in recent days she has emphasized that despite what her caucus doesn’t like about the bill, it contains many policies eagerly sought by Democrats.

Congress passed sweeping fiscal legislation Dec. 18, that will avert a government shutdown, lock in billions of dollars of tax breaks for corporations and scrap a 40-year ban on the export of U.S. oil. (Reuters)

Pelosi told reporters Friday morning that adding the oil export ban to the spending bill made it very difficult to convince some Democrats to vote for the legislation, but she said that by allowing it to be included Democrats were able to extract concessions of their own, such as an extension of renewable energy tax credits.

“Absent big oil we could not have had many of these other successes,” Pelosi told reporters before the vote. “[Republicans] wanted big oil so much that they gave away the store.”

There was far less drama in the Senate over the agreement, which McConnell and Minority Leader Harry Reid (D-Nev.) pitched as a deal with wins for both parties and the best that could be expected in a divided government.

Reid said Democrats’ goals going into the spending negotiations were to increase funding equally for both domestic and military programs, get rid of the so-called sequestration automatic budget cuts and prevent Republicans from adding policy provisions to the bill Democrats oppose.

“All three goals we had, we accomplished,” he said.

At a news conference on Friday, President Obama took note of the recent level of bipartisan cooperation, singling out the recent education overhaul bill, highway legislation and the budget deal.

“I do want to thank Congress for ending the year on a high note,” he said.