Trump's proposed cuts for the State Department were largely ignored, and the deal even inserted about $1 billion for starvation prevention and relief into the department's budget.
"The omnibus (spending bill) is in sharp contrast to President Trump's risky plans to steal billions from lifesaving research, instead increasing funding for the NIH (National Institutes of Health) by $2 billion", House Minority Leader Nancy Pelosi, D-California, said in a statement.
Democrats were pushing to have those payments included in the spending bill, but the White House promise to keep the payments going, at least for a short while, was enough to bring them along.
But Republicans are pleased because the bill adds some $1.5 billion in funding for other security efforts along the almost 2,000-mile (3,218-kilometer) border, and boosts military spending.
If this deal passes Congress and the president signs it into law, as expected, it would mark the first significant bipartisan legislation passing Congress this year and since Trump took office on January 20.
Trump scored a partial win, getting a commitment for up to $15 billion in additional funding for a military buildup. Negotiators on the pending measure, however, rejected a smaller $18 billion package of cuts and instead slightly increased funding for domestic programs.
There were a number of key disputes during tense negotiations, and Republicans - who control the Congress, Senate and White House - were forced to make concessions.
Democrats played a strong hand in the talks since their votes are needed to pass the bill, even though Republicans control both the White House and Congress. The minority party has been actively involved in the talks, which appear headed to produce a lowest common denominator measure that won't look too much different than the deal that could have been struck on Obama's watch a year ago.
While the measure would peacefully end a battle over the current budget year, the upcoming cycle is sure to be even more hard.
Democrats were pushing to protect funding for women's healthcare provider Planned Parenthood and sought additional Medicaid money to help the poor in Puerto Rico get healthcare. Chuck Schumer said in a statement.
Republicans had pressed for policy wins with so-called riders related to other abortion-related issues and blocking environmental regulations such as Obama's sweeping expansion of the Clean Water Act.
GOP leaders decided against trying to use the must-do spending bill to "defund" Planned Parenthood.
_Policy riders. GOP leaders backed away from language to take away grants from "sanctuary cities" that do not share information about people's immigration status with federal authorities.
The deal also includes an increase of $2 billion for National Institutes of Health funding and year-round Pell grants, as opposed to grants only awarded twice per year, also a victory for Democrats.
The bill increases Amtrak's budget by $105 million to $1.5 billion, awards the Federal Bureau of Investigation with a 3 percent budget increase, and maintains funding for an Obama-founded grant program for transportation grants at $500 million.
Trump signed an executive order in January asking the military to draft a new strategy for defeating ISIS.
The final spending package includes a almost $70 million reimbursement to law enforcement agencies for costs incurred helping to protect President Trump and the first family.