In a Congress plagued by partisanship, it was compromise that led to an agreement late Sunday night on a $1 trillion bill to fund the government through the rest of this fiscal year. And while Democrats got much of what they sought, both parties are claiming some measure of victory.

Republicans, who have been blamed for past government shutdowns, didn't want to own another, especially since they are the party in control of both houses of Congress as well as the White House.

That the funding deadline came so close to President Donald Trump's 100th day in office was another impetus to striking a deal. And after a failed first attempt to repeal and replace the Affordable Care Act, a six-year GOP campaign promise, they are a party trying to prove that they can govern.

The bill maintained funding for Planned Parenthood and sanctuary cities. It included money for Puerto Rico's Medicaid program and a permanent funding stream for coal miners' health insurance. It also directed money for the cost-sharing subsidies for low income people to purchase health insurance in the Affordable Care Act. All of these were Democratic demands.

Related: Congressional Leaders Reach $1 Trillion to Avert Shutdown

It includes an additional $2 billion for the National Institute of Health, despite Trump's desire to cut funding. It fully funded Pell Grants to help low-income people pay for college. It included $17 more million for renewable energy programs and $42 million for the Department of Energy's department of science.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

It included an additional $1.5 billion in border security, but $1.5 billion less than Trump wanted, and had no funding at all for the construction of a border wall.

Democrats quickly praised the measure, calling it a victory.

“I would not say there’s a major loss in here," said Senate Minority Leader Chuck Schumer at a gaggle with reporters Monday. "There are a few things we would’ve preferred come out differently."

Republicans are touting an additional $25 billion in defense spending over last year's request, even though it's about $15 billion less than the administration wanted.

Vice President Mike Pence said Trump signed off on the deal yesterday.

"We couldn't be more pleased that, thanks to President Trump's leadership and direct engagement last night at the White House, leaders in the House and Senate in both parties signed off on a budget deal. It'll avert a government shutdown but more important than that, there's going to be a significant increase in military spending," Pence said on CBS "This Morning."

And in a statement, House Speaker Paul Ryan said, “America will be stronger and safer because of this government funding bill. It acts on President Trump’s commitment to rebuild our military for the 21st century and bolster our nation’s border security to protect our homeland. Importantly, we have boosted resources for our defense needs without corresponding increases in non-defense spending, as Democrats had insisted upon for years."

Even though Republicans hold majorities in both the House and Senate, they needed Democratic support to pass any speeding measure because eight Democratic votes are needed to avoid a Senate filibuster.

And many conservative House Republicans rarely vote for spending bills, making the Democrats' votes even necessary.

Rep. Jim Jordan, R-Ohio, already said Monday morning that he's not likely to vote for it. The conservative congressman called the bill disappointing.

"I think you’re going to see a lot of conservatives be against this plan this week. Why did we last fall do a short term spending bill if we weren’t actually going to fight for the things we told the voters we were going to fight for?" Jordan said on CNN.

Both the House and the Senate will vote on the compromise this week. It has to go to the president's desk to be signed into law by Friday, when the current short-term, stop-gap bill to fund the government runs out.