The $1.16 trillion spending bill passed the House last week, also with broad bipartisan support, even though it ignores Trump's persistent promise to build a wall along the border with Mexico.
It passed the Senate by a 79-18 vote, and now heads to the White House for Trump's signature ahead of a Friday night deadline to fund the government or face a temporary shutdown.
The deal, which keeps federal operations running through the end of the fiscal year on September 30, was struck after weeks of tense negotiations.
It was touted as a victory by Democrats because they managed to strip several elements of Trump's wish list from the legislation.
It includes $1.5 billion in funding for increased border security measures, but no money for one of Trump's most repeated campaign pledges: construction of a border wall.
And it backs away from language that would have slashed grants to "sanctuary cities" that have vowed not to enforce strict federal immigration laws.
It also maintains spending levels for the State Department and other key government agencies that Trump had proposed gutting.
An additional $2 billion in new funding will be committed to the National Institutes of Health, while $295 million in Medicaid assistance will flow to debt-saddled Puerto Rico.
Republicans claim victory because the measure boosts military funding, breaking the longstanding Democratic position that new spending must be equally split among defense and non-defense expenditures.
Of the trillion dollars in the bill's discretionary spending, $598.5 billion is slated for defense -- an increase of $25 billion, or 4.5 percent, above fiscal year 2016 levels.
Trump appeared frustrated by the perception that Democrats had rolled the White House and Republican majority on the funding deal.
Earlier this week he tweeted that "Our country needs a good 'shutdown' in September to fix mess!"
But he appeared to embrace the agreement in later comments, calling it a "clear win" for the American people.
Negotiators included 2,500 additional visas to Afghan interpreters and support staff who worked with US forces in Afghanistan.
They also agreed to expand the number of temporary visas to foreign workers, particularly those who do seasonal work at US vacation resorts.
Analysts have criticized the provision, saying it undermines Trump's own pledge to protect American jobs from foreign competitors.
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.