Late Sunday, congressional negotiators for both parties reached an agreement on a massive spending bill that if approved by the House and Senate would fund the government through the end of September. The plan would add billions for the Pentagon and border security, but would not provide any money for President Donald Trump’s promised border wall with Mexico, dealing yet another blow.

According to CNN, the deal was reached after weeks of negotiations between Republicans and Democrats who battled over spending priorities, but who were equally determined to avoid a politically fraught government shutdown. Republicans, who control Congress and the White House, were particularly wary of a shutdown on their watch.

Negotiations initially stalled over a threat by Trump to cut off Obamacare subsidies paid to insurance companies to reduce the out-of-pocket expenses of some low-income users of the Affordable Care Act, but Trump backed off that demand in the face of harsh criticism from Democrats.

Though each side still has some words about what made it into the bill, both agree on the key aspects. The bill allocates $1.5 billion for border security, including for technology and fixing existing infrastructure, but it doesn’t allow the money to be spent on building Trump’s wall. There is no money provided for a deportation force and there are no cuts to so-called sanctuary cities.

There are no cuts to funding for Planned Parenthood, a demand from Democrats. Funding for the National Institute of Health is increased by $2 billion and there is additional money for clean energy and science funding. There is also a disaster aid package that includes funding for California, West Virginia, Louisiana and North Carolina. There is increased funding for transit infrastructure grants and to fight the opioid epidemic. Year-round Pell Grants were restored.

The bill also includes billions in new defense spending, including for the global war on terrorism, a major demand from Republicans.

Senate Minority Leader Chuck Schumer released a statement Sunday evening saying the agreement is consistent with his party’s principles.

“This agreement is a good agreement for the American people, and takes the threat of a government shutdown off the table,” the New York-based Democrat said in a statement.

House Democratic Leader Nancy Pelosi also praised the proposal, saying in a statement, “We have made significant progress improving the omnibus bill.”

Votes in both chambers are expected by the end of the week.